五、Linux安装rpm文件时报错

一、下载rpm文件

    在配置Hue中需要安装大量rpm文件,其中包括:

    五、Linux安装rpm文件时报错_第1张图片

    我们可以直接在linux的镜像文件中解压Package文件夹中rpm数据,并筛选出当中需要的rpm文件

    五、Linux安装rpm文件时报错_第2张图片

二、上传文件到远程服务器中

    将rpm文件通过xftp的方式上传到远程服务器中


三、执行安装命令

    1、通过yum install *报错

    Resolving Dependencies
--> Running transaction check
---> Package ant.i686 0:1.7.1-13.el6 will be installed
--> Processing Dependency: java-devel >= 1.5.0 for package: ant-1.7.1-13.el6.i686
--> Processing Dependency: jpackage-utils >= 1.7.5 for package: ant-1.7.1-13.el6.i686
--> Processing Dependency: jpackage-utils >= 1.7.5 for package: ant-1.7.1-13.el6.i686
--> Processing Dependency: jpackage-utils >= 1.7.5 for package: ant-1.7.1-13.el6.i686
--> Processing Dependency: libgcj_bc.so.1 for package: ant-1.7.1-13.el6.i686
--> Processing Dependency: xerces-j2 for package: ant-1.7.1-13.el6.i686
--> Processing Dependency: xml-commons-jaxp-1.3-apis for package: ant-1.7.1-13.el6.i686
---> Package cyrus-sasl-devel.i686 0:2.1.23-13.el6 will be installed
---> Package gcc-c++.i686 0:4.4.6-3.el6 will be installed
--> Processing Dependency: libstdc++-devel = 4.4.6-3.el6 for package: gcc-c++-4.4.6-3.el6.i686
---> Package gmp-devel.i686 0:4.3.1-7.el6 will be installed
---> Package krb5-devel.i686 0:1.9-22.el6 will be installed
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.9-22.el6.i686
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.9-22.el6.i686
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.9-22.el6.i686
---> Package libtidy.i686 0:0.99.0-19.20070615.1.el6 will be installed
---> Package libxml2-devel.i686 0:2.7.6-4.el6 will be installed
--> Processing Dependency: zlib-devel for package: libxml2-devel-2.7.6-4.el6.i686
---> Package libxslt-devel.i686 0:1.1.26-2.el6 will be installed
--> Processing Dependency: libgcrypt-devel for package: libxslt-devel-1.1.26-2.el6.i686
---> Package mysql.i686 0:5.1.52-1.el6_0.1 will be installed
---> Package mysql-devel.i686 0:5.1.52-1.el6_0.1 will be installed
--> Processing Dependency: openssl-devel for package: mysql-devel-5.1.52-1.el6_0.1.i686
---> Package openldap-devel.i686 0:2.4.23-20.el6 will be installed
---> Package python-devel.i686 0:2.6.6-29.el6 will be installed
---> Package sqlite-devel.i686 0:3.6.20-1.el6 will be installed
--> Finished Dependency Resolution
Error: Package: ant-1.7.1-13.el6.i686 (/ant-1.7.1-13.el6.i686)
           Requires: java-devel >= 1.5.0
Error: Package: ant-1.7.1-13.el6.i686 (/ant-1.7.1-13.el6.i686)
           Requires: jpackage-utils >= 1.7.5
Error: Package: libxslt-devel-1.1.26-2.el6.i686 (/libxslt-devel-1.1.26-2.el6.i686)
           Requires: libgcrypt-devel
Error: Package: krb5-devel-1.9-22.el6.i686 (/krb5-devel-1.9-22.el6.i686)
           Requires: libcom_err-devel
Error: Package: krb5-devel-1.9-22.el6.i686 (/krb5-devel-1.9-22.el6.i686)
           Requires: libselinux-devel
Error: Package: gcc-c++-4.4.6-3.el6.i686 (/gcc-c++-4.4.6-3.el6.i686)
           Requires: libstdc++-devel = 4.4.6-3.el6
Error: Package: libxml2-devel-2.7.6-4.el6.i686 (/libxml2-devel-2.7.6-4.el6.i686)
           Requires: zlib-devel
Error: Package: krb5-devel-1.9-22.el6.i686 (/krb5-devel-1.9-22.el6.i686)
           Requires: keyutils-libs-devel
Error: Package: mysql-devel-5.1.52-1.el6_0.1.i686 (/mysql-devel-5.1.52-1.el6_0.1.i686)
           Requires: openssl-devel
Error: Package: ant-1.7.1-13.el6.i686 (/ant-1.7.1-13.el6.i686)
           Requires: libgcj_bc.so.1
Error: Package: ant-1.7.1-13.el6.i686 (/ant-1.7.1-13.el6.i686)
           Requires: xml-commons-jaxp-1.3-apis
Error: Package: ant-1.7.1-13.el6.i686 (/ant-1.7.1-13.el6.i686)
           Requires: xerces-j2
 You could try using --skip-broken to work around the problem

 You could try running: rpm -Va --nofiles --nodigest

    所以我尝试一个一个的安装。

    2.通过rpm -ivh gcc-c++-4.4.6-3.el6.i686.rpm安装报错:

    warning: gcc-c++-4.4.6-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:

libstdc++-devel = 4.4.6-3.el6 is needed by gcc-c++-4.4.6-3.el6.i686

    3.通过rpm -qa|grep libstdc

        error: Failed dependencies:
libstdc++-devel = 4.4.6-3.el6 is needed by gcc-c++-4.4.6-3.el6.i686

    4.发现在安装中缺少依赖,即libstdc++-devel没有安装

四、分析问题并解决

    重新上传依赖包并安装

        1.执行:rpm -Uvh libstdc++-devel-4.4.6-3.el6.i686.rpm

        warning: libstdc++-devel-4.4.6-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
            Preparing...                ########################################### [100%]

           1:libstdc++-devel        ########################################### [100%]

        2.执行: rpm -ivh gcc-c++-4.4.6-3.el6.i686.rpm

        warning: gcc-c++-4.4.6-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
            Preparing...                ########################################### [100%]

           1:gcc-c++                ########################################### [100%]

        安装成功!

 参考此博客得出解决方法:https://blog.csdn.net/cookiesoe/article/details/54584378

你可能感兴趣的:(Hadoop)