yum 安装失败,显示 401 需要授权

yum 安装失败,显示 401 需要授权

我正在运行 Red Hat Linux 6.2

尝试使用 yum 安装 nfs 软件包

以下是

存储库列表

repo id                                                                repo name                                                                                      status
base                                                                   CentOS-6 - Base                                                                                 6,713
centos                                                                 CentOS 6 - x86_64                                                                                   0
cloudera-cdh5                                                          Cloudera's Distribution for Hadoop, Version 5                                                     153
cloudera-gplextras5                                                    Cloudera's GPLExtras, Version 5                                                                     9
cloudera-kafka                                                         Cloudera's Distribution for kafka, Version 2                                                        4
cloudera-manager                                                       Cloudera Manager, Version 5                                                                         7
epel                                                                   Extra Packages for Enterprise Linux                                                            12,513
extras                                                                 CentOS-6 - Extras                                                                                  33
rpmfusion-free-updates                                                 RPM Fusion for EL 6 - Free - Updates                                                              230
updates                                                                CentOS-6 - Updates                                                                                142
vmware-tools                                                           VMWare Tools                                                                                       33
repolist: 19,837

当我发出如下命令安装 nfs 软件包时,它失败了 -

sudo yum install hadoop-hdfs-nfs3

它失败

下面显示了每个正在下载的依赖项的两个错误 -

1

[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
Trying other mirror.

2

[Errno 256] No more mirrors to try.

以下是命令的完整输出 -

   Loaded plugins: fastestmirror, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
     * base: centos.excellmedia.net
     * epel: mirrors.isu.net.sa
     * extras: centos.excellmedia.net
     * rpmfusion-free-updates: mirror.lzu.edu.cn
     * updates: mirrors.viethosting.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package hadoop-hdfs-nfs3.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be installed
    --> Processing Dependency: hadoop = 2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 for package: hadoop-hdfs-nfs3-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 for package: hadoop-hdfs-nfs3-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64
    --> Running transaction check
    ---> Package hadoop.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-hdfs-fuse-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-0.20-mapreduce-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-0.20-mapreduce-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-libhdfs-devel-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-conf-pseudo-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-client-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-yarn-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-yarn-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-mapreduce-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-mapreduce-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    ---> Package hadoop.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    base/filelists_db                                                                                                                                    | 6.4 MB     00:54     
    cloudera-cdh5/filelists                                                                                                                              | 440 kB     00:30     
    cloudera-gplextras5/filelists                                                                                                                        | 5.6 kB     00:00     
    cloudera-kafka/filelists                                                                                                                             | 2.4 kB     00:00     
    cloudera-manager/filelists                                                                                                                           | 128 kB     00:08     
    epel/filelists                                                                                                                                       | 7.3 MB     09:14     
    extras/filelists_db                                                                                                                                  |  24 kB     00:00     
    https://mirror.lzu.edu.cn/rpmfusion/free/el/updates/6/x86_64/repodata/6ff3fb17129839139ff7d53fedce33cb7c58bce2c4ac21c9eac9a809403786b8-filelists.sqlite.bz2: [Errno 14] problem making ssl connection
    Trying other mirror.
    rpmfusion-free-updates/filelists_db                                                                                                                  | 124 kB     00:00     
    http://mirrors.viethosting.com/centos/6.10/updates/x86_64/repodata/7982c733d4660661cd9b10a58eabfba7d6b16879c57850ad2c1cb95f403a7f3f-filelists.sqlite.bz2: [Errno 12] Timeout on http://mirrors.viethosting.com/centos/6.10/updates/x86_64/repodata/7982c733d4660661cd9b10a58eabfba7d6b16879c57850ad2c1cb95f403a7f3f-filelists.sqlite.bz2: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
    Trying other mirror.
    updates/filelists_db                                                                                                                                 | 921 kB     00:03     
    vmware-tools/filelists                                                                                                                               | 4.0 kB     00:00     
    ---> Package hadoop-hdfs.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-hdfs-namenode-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-hdfs-namenode-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-libhdfs-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-httpfs-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-httpfs-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-hdfs-datanode-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-hdfs-datanode-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-hdfs-secondarynamenode-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-hdfs-secondarynamenode-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-hdfs-journalnode-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-hdfs = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-mapreduce-historyserver-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    ---> Package hadoop-hdfs.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    --> Running transaction check
    ---> Package hadoop-0.20-mapreduce.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-0.20-mapreduce.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-client.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    --> Processing Dependency: hadoop-client = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-kms-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    ---> Package hadoop-client.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-conf-pseudo.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-conf-pseudo.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    --> Processing Dependency: hadoop-yarn-nodemanager = 2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 for package: hadoop-conf-pseudo-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64
    --> Processing Dependency: hadoop-yarn-resourcemanager = 2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 for package: hadoop-conf-pseudo-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64
    ---> Package hadoop-hdfs-datanode.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-hdfs-datanode.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-hdfs-fuse.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-hdfs-fuse.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-hdfs-journalnode.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-hdfs-journalnode.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-hdfs-namenode.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-hdfs-namenode.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-hdfs-secondarynamenode.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-hdfs-secondarynamenode.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-httpfs.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-httpfs.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-libhdfs.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-libhdfs.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-libhdfs-devel.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-libhdfs-devel.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-mapreduce.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-mapreduce.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-mapreduce-historyserver.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-mapreduce-historyserver.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-yarn.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    --> Processing Dependency: hadoop-yarn = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-yarn-proxyserver-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    --> Processing Dependency: hadoop-yarn = 2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 for package: hadoop-yarn-proxyserver-2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6.x86_64
    ---> Package hadoop-yarn.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    --> Running transaction check
    ---> Package hadoop-kms.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-kms.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-yarn-nodemanager.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-yarn-nodemanager.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-yarn-proxyserver.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-yarn-proxyserver.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    ---> Package hadoop-yarn-resourcemanager.x86_64 0:2.6.0+cdh5.13.0+2639-1.cdh5.13.0.p0.34.el6 will be updated
    ---> Package hadoop-yarn-resourcemanager.x86_64 0:2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6 will be an update
    --> Finished Dependency Resolution

    Dependencies Resolved

    ============================================================================================================================================================================
     Package                                         Arch                    Version                                                       Repository                      Size
    ============================================================================================================================================================================
    Installing:
     hadoop-hdfs-nfs3                                x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  5.0 k
    Updating for dependencies:
     hadoop                                          x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   76 M
     hadoop-0.20-mapreduce                           x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   88 M
     hadoop-client                                   x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   34 k
     hadoop-conf-pseudo                              x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  8.9 k
     hadoop-hdfs                                     x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   24 M
     hadoop-hdfs-datanode                            x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  5.2 k
     hadoop-hdfs-fuse                                x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   22 k
     hadoop-hdfs-journalnode                         x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  5.1 k
     hadoop-hdfs-namenode                            x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  5.4 k
     hadoop-hdfs-secondarynamenode                   x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  5.2 k
     hadoop-httpfs                                   x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   17 M
     hadoop-kms                                      x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   17 M
     hadoop-libhdfs                                  x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   27 k
     hadoop-libhdfs-devel                            x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   10 k
     hadoop-mapreduce                                x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   33 M
     hadoop-mapreduce-historyserver                  x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  5.1 k
     hadoop-yarn                                     x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                   15 M
     hadoop-yarn-nodemanager                         x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  5.0 k
     hadoop-yarn-proxyserver                         x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  4.9 k
     hadoop-yarn-resourcemanager                     x86_64                  2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6                     cloudera-cdh5                  4.9 k

    Transaction Summary
    ============================================================================================================================================================================
    Install       1 Package(s)
    Upgrade      20 Package(s)

    Total download size: 269 M
    Is this ok [y/N]: y
    Downloading Packages:
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-0.20-mapreduce-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-client-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-conf-pseudo-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
...
...
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-hdfs-secondarynamenode-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-httpfs-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-kms-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-libhdfs-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-libhdfs-devel-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-mapreduce-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-mapreduce-historyserver-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-yarn-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-yarn-nodemanager-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-yarn-proxyserver-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.
    http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-yarn-resourcemanager-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401 Authorization Required"
    Trying other mirror.


    Error Downloading Packages:
      hadoop-libhdfs-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-libhdfs-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-conf-pseudo-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-conf-pseudo-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-hdfs-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-hdfs-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-yarn-proxyserver-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-yarn-proxyserver-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-hdfs-datanode-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-hdfs-datanode-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-kms-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-kms-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
...
...
...
      hadoop-yarn-nodemanager-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-yarn-nodemanager-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-mapreduce-historyserver-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-mapreduce-historyserver-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-hdfs-journalnode-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-hdfs-journalnode-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-yarn-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-yarn-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-hdfs-fuse-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-hdfs-fuse-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-httpfs-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-httpfs-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-hdfs-nfs3-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-hdfs-nfs3-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.
      hadoop-yarn-resourcemanager-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64: failure: RPMS/x86_64/hadoop-yarn-resourcemanager-2.6.0+cdh5.15.1+2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm from cloudera-cdh5: [Errno 256] No more mirrors to try.

作为解决方法,我通过 bash 触发的“wget”下载依赖的 URL(使用我工作网络的http用户名和http密码来通过防火墙

下载链接.txt

http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm
http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-0.20-mapreduce-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm
http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-client-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm
http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-conf-pseudo-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm
http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-hdfs-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm
http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/x86_64/hadoop-hdfs-datanode-2.6.0%2Bcdh5.15.1%2B2822-1.cdh5.15.1.p0.4.el6.x86_64.rpm

…………

Bash 运行脚本

links="`cat links_to_download.txt | xargs`"

for link in $links
do
        echo "-> $link"
        wget --http-user=nitin --http-password=XXXxxx --tries=2 -o=downloadlinks.log -r $link
        RC=$?
        if [[ "$RC" -ne "0" ]]; then
                echo "[failed] - $RC"
        else
                echo "Done!"
        fi
done

然后我将使用 yum install 针对本地路径手动安装。

有没有更干净的方法可以直接在 yum 命令中执行此操作?

答案1

yum(Python 脚本)是为了支持代理而编写的;代码在urllib.py 中的 getproxies_environment 函数:

扫描环境中名为 _proxy 的变量;这似乎是标准约定。为了更喜欢小写变量,我们分两次处理环境,第一次匹配任意,第二次仅匹配小写代理。

http_proxy由于您的存储库是 HTTP(而不是 HTTPS),因此请在调用 yum 之前设置变量并导出它:

export http_proxy=http://username:[email protected]

或者——不太灵活,因为它会对你的密码进行硬编码——配置/etc/yum.conf和:

proxy=http://proxy.example.com:3128 
proxy_username=yum-user 
proxy_password=qwerty

相关内容