Scientific linux:如何使用rpm安装yum?

前端之家收集整理的这篇文章主要介绍了Scientific linux:如何使用rpm安装yum?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在Scientific linux 6.0(RH如 linux)
我不小心删除python,所以也删除了yum

如何用rpm安装yum?

编辑

我尝试安装python但它以某种方式循环依赖:

rpm -Uvh http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/python-libs-2.6.5-3.el6.x86_64.rpm
    Retrieving http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/python-libs-2.6.5-3.el6.x86_64.rpm
    error: Failed dependencies:
            python = 2.6.5-3.el6 is needed by python-libs-2.6.5-3.el6.x86_64

然后:

rpm -Uvh http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/python
-2.6.5-3.el6.x86_64.rpm
Retrieving http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/python-2.6.5-3.el6.x86_64.rpm
error: Failed dependencies:
        libpython2.6.so.1.0()(64bit) is needed by python-2.6.5-3.el6.x86_64

解决方法

下载软件包并输入rpm -Uvh< packagenames>以root或sudo rpm -Uvh< packagenames>作为普通用户

我使用rpm -qpR yum-3.2.27-14.el6.noarch.rpm来获取yum的依赖项列表,希望能一次性完成它们:

使用以下代码块下载所有包:

wget http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/python-2.6.5-3.el6.x86_64.rpm \
http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/python-libs-2.6.5-3.el6.x86_64.rpm \
http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm \
http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/pygpgme-0.1-18.20090824bzr68.el6.x86_64.rpm \
http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/python-urlgrabber-3.9.1-7.el6.noarch.rpm \
http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/python-pycurl-7.19.0-5.el6.x86_64.rpm \
http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/rpm-python-4.8.0-12.el6.x86_64.rpm \
http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/yum-3.2.27-14.el6.noarch.rpm \
http://ftp2.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/yum-Metadata-parser-1.1.2-14.1.el6.x86_64.rpm

按如下方式安装它们:

rpm -Uhv py*.rpm \
   yum*.rpm \
   rpm-py*.rpm
原文链接:https://www.f2er.com/linux/396445.html

猜你在找的Linux相关文章