V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐工具
RoboMongo
推荐书目
50 Tips and Tricks for MongoDB Developers
Related Blogs
Snail in a Turtleneck
Techxiu
V2EX  ›  MongoDB

用 yum 安装 MongoDB 报 404

  •  
  •   Techxiu · 2016-06-29 13:25:31 +08:00 · 7120 次点击
    这是一个创建于 3061 天前的主题,其中的信息可能已经有所发展或是发生改变。

    centos7

    按照 官方文档 创建了 /etc/yum.repos.d/mongodb-org-3.2.repo 填写配置

    [mongodb-org-3.2]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc
    

    然后

    yum install -y mongodb-org
    
    Loaded plugins: langpacks
    Repository 'mongodb': Error parsing config: Error parsing "enabled = ''": invalid boolean value
    https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/repodata/repomd.xml: [Errno 12] Timeout on https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/repodata/repomd.xml: (28, 'Resolving timed out after 3516 milliseconds')
    Trying other mirror.
    https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
    Trying other mirror.
    Resolving Dependencies
    --> Running transaction check
    ---> Package mongodb-org.x86_64 0:3.2.7-1.el7 will be installed
    --> Processing Dependency: mongodb-org-tools = 3.2.7 for package: mongodb-org-3.2.7-1.el7.x86_64
    --> Processing Dependency: mongodb-org-shell = 3.2.7 for package: mongodb-org-3.2.7-1.el7.x86_64
    --> Processing Dependency: mongodb-org-server = 3.2.7 for package: mongodb-org-3.2.7-1.el7.x86_64
    --> Processing Dependency: mongodb-org-mongos = 3.2.7 for package: mongodb-org-3.2.7-1.el7.x86_64
    --> Running transaction check
    ---> Package mongodb-org-mongos.x86_64 0:3.2.7-1.el7 will be installed
    ---> Package mongodb-org-server.x86_64 0:3.2.7-1.el7 will be installed
    ---> Package mongodb-org-shell.x86_64 0:3.2.7-1.el7 will be installed
    ---> Package mongodb-org-tools.x86_64 0:3.2.7-1.el7 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package                Arch       Version            Repository           Size
    ================================================================================
    Installing:
     mongodb-org            x86_64     3.2.7-1.el7        mongodb-org-3.2     5.8 k
    Installing for dependencies:
     mongodb-org-mongos     x86_64     3.2.7-1.el7        mongodb-org-3.2     5.6 M
     mongodb-org-server     x86_64     3.2.7-1.el7        mongodb-org-3.2      12 M
     mongodb-org-shell      x86_64     3.2.7-1.el7        mongodb-org-3.2     6.7 M
     mongodb-org-tools      x86_64     3.2.7-1.el7        mongodb-org-3.2      43 M
    
    Transaction Summary
    ================================================================================
    Install  1 Package (+4 Dependent packages)
    
    Total download size: 68 M
    Installed size: 221 M
    Downloading packages:
    Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
    mongodb-org-mongos-3.2.7-1.el7 FAILED
    https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-mongos-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
    Trying other mirror.
    mongodb-org-3.2.7-1.el7.x86_64 FAILED
    https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
    Trying other mirror.
    mongodb-org-server-3.2.7-1.el7 FAILED
    https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-server-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
    Trying other mirror.
    mongodb-org-shell-3.2.7-1.el7. FAILED
    https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-shell-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
    Trying other mirror.
    mongodb-org-tools-3.2.7-1.el7. FAILED
    https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-tools-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
    Trying other mirror.
    
    
    Error downloading packages:
      mongodb-org-mongos-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
      mongodb-org-shell-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
      mongodb-org-tools-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
      mongodb-org-server-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
      mongodb-org-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
    

    这样应该怎么办?求 dalao 帮助

    6 条回复    2016-06-29 15:28:19 +08:00
    janxin
        1
    janxin  
       2016-06-29 13:27:05 +08:00
    你访问国外网址有点问题...
    Techxiu
        2
    Techxiu  
    OP
       2016-06-29 13:35:17 +08:00
    @janxin 刚刚又试了下安装成功了,但是发帖的时候是真的 404 ,有挂代理试过
    DoraJDJ
        3
    DoraJDJ  
       2016-06-29 13:43:43 +08:00 via Android
    直接下载 Binary 运行不方便吗?
    Techxiu
        4
    Techxiu  
    OP
       2016-06-29 13:49:15 +08:00
    @DoraJDJ 还是喜欢直接 yum 装
    lslqtz
        5
    lslqtz  
       2016-06-29 15:12:32 +08:00
    下包编译大法好
    Neveroldmilk
        6
    Neveroldmilk  
       2016-06-29 15:28:19 +08:00
    有时候官方的源会被暂时屏蔽的,最好使用国内镜像。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2744 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 14:52 · PVG 22:52 · LAX 06:52 · JFK 09:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.