首页 > 系统相关 >yum update (python)

yum update (python)

时间:2023-11-02 13:07:31浏览次数:37  
标签:python py python2.7 update yum usr File line

yum update

 

Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 239, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1198, in buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 893, in resolveDeps
    CheckDeps, checkinstalls, checkremoves, missing = self._resolveRequires(errors)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1025, in _resolveRequires
    (checkdep, missing, errormsgs) = self._processReq(po, dep)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 350, in _processReq
    CheckDeps, missingdep = self._requiringFromTransaction(po, requirement, errormsgs)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 680, in _requiringFromTransaction
    rel=pkg.rel)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 5280, in update
    availpkgs = self._compare_providers(availpkgs, requiringPo)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1648, in _compare_providers
    bestnum = max(pkgresults.values())
ValueError: max() arg is an empty sequence

 ln -s /usr/bin/python2.7 /usr/bin/python

 

 

Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 239, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1198, in buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 893, in resolveDeps
    CheckDeps, checkinstalls, checkremoves, missing = self._resolveRequires(errors)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1025, in _resolveRequires
    (checkdep, missing, errormsgs) = self._processReq(po, dep)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 350, in _processReq
    CheckDeps, missingdep = self._requiringFromTransaction(po, requirement, errormsgs)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 680, in _requiringFromTransaction
    rel=pkg.rel)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 5280, in update
    availpkgs = self._compare_providers(availpkgs, requiringPo)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1648, in _compare_providers
    bestnum = max(pkgresults.values())
ValueError: max() arg is an empty sequence

 

---> 软件包 nvidia-container-runtime.x86_64.0.2.0.0-1.docker18.09.0 将被 升级
---> 软件包 nvidia-container-runtime.x86_64.0.3.3.0-1 将被 更新
---> 软件包 nvidia-container-runtime-hook.x86_64.0.1.4.0-2 将被 取代
---> 软件包 nvidia-container-toolkit.x86_64.0.1.2.1-2 将被 舍弃
---> 软件包 nvidia-detect.x86_64.0.410.78-1.el7.elrepo 将被 升级
---> 软件包 nvidia-detect.x86_64.0.440.64-1.el7.elrepo 将被 更新
---> 软件包 nvidia-docker2.noarch.0.2.0.3-1.docker18.09.0.ce 将被 升级
---> 软件包 nvidia-docker2.noarch.0.2.4.0-1 将被 更新
---> 软件包 nvidia-x11-drv-390xx.x86_64.0.390.87-1.el7_5.elrepo 将被 升级
--> 正在处理依赖关系 libGLdispatch.so.0()(64bit),它被软件包 1:libglvnd-glx-1.0.1-0.8.git5baa1e5.el7.x86_64 需要
--> 正在处理依赖关系 libGLdispatch.so.0()(64bit),它被软件包 1:libglvnd-egl-1.0.1-0.8.git5baa1e5.el7.x86_64 需要
--> 正在处理依赖关系 libGLdispatch.so.0()(64bit),它被软件包 1:libglvnd-gles-1.0.1-0.8.git5baa1e5.el7.x86_64 需要
--> 正在处理依赖关系 libnvidia-ml.so.1()(64bit),它被软件包 nvidia-x11-drv-390xx-390.138-1.el7_8.elrepo.x86_64 需要
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 239, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1198, in buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 893, in resolveDeps
    CheckDeps, checkinstalls, checkremoves, missing = self._resolveRequires(errors)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1025, in _resolveRequires
    (checkdep, missing, errormsgs) = self._processReq(po, dep)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 350, in _processReq
    CheckDeps, missingdep = self._requiringFromTransaction(po, requirement, errormsgs)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 680, in _requiringFromTransaction
    rel=pkg.rel)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 5280, in update
    availpkgs = self._compare_providers(availpkgs, requiringPo)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1648, in _compare_providers
    bestnum = max(pkgresults.values())
ValueError: max() arg is an empty sequence

https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/

Use “make altinstall” to prevent problems

It is critical that you use make altinstall when you install your custom version of Python. If you use the normal make install you will end up with two different versions of Python in the filesystem both named python. This can lead to problems that are very hard to diagnose.

# Python 3.8.5:

wget http://python.org/ftp/python/3.8.5/Python-3.8.5.tar.xz

tar xf Python-3.8.5.tar.xz

cdPython-3.8.5

./configure--prefix=/usr/local--enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"

make&&makealtinstall

# pwd
/usr/local/bin
# ls py*
pydoc3  pydoc3.8  python3.8  python3.8-config
/usr/local/bin/python3.8

# /usr/local/bin/python3.8
Python 3.8.5 (default, Sep  4 2020, 19:48:39)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cytpes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cytpes'
>>> exit()

# python3.8
Python 3.8.5 (default, Sep  4 2020, 19:48:39)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cyptes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cyptes'

wget https://bootstrap.pypa.io/get-pip.py

python3.8 get-pip.py

 

# yum install libffi-devel
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.lzu.edu.cn
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * epel: my.mirrors.thegigabit.com
 * extras: mirror.lzu.edu.cn
 * updates: mirror.lzu.edu.cn
软件包 libffi-devel-3.0.13-19.el7.x86_64 已安装并且是最新版本
无须任何处理

 

REF

https://pure-defect.com/2019/06/patching-centos-7-and-overcoming-problems/

 



标签:python,py,python2.7,update,yum,usr,File,line
From: https://blog.51cto.com/emanlee/8143849

相关文章

  • CentOS 卸载 python
    卸载python2.7rpm-qa|greppython2|xargsrpm-ev--allmatches--nodepswhereispython2|xargsrm-frv-------------------卸载python3rpm-qa|greppython3|xargsrpm-ev--allmatches--nodeps卸载pyhton3whereispython3|xargsrm-frv删除所有残......
  • centos7 python2和python3共存
     ln-s/usr/local/python3/bin/python3/usr/bin/python #测试[root@operationbin]#pip3-Vpip18.1from/usr/local/python3/lib/python3.6/site-packages/pip(python3.6)#使用[root@operationbin]#pip3install包名或者[root@operationbin]#pyth......
  • python爬虫数据存进mysql数据库
    一、安装mysql和mysqlworkbench我已经在电脑上安装了最新的mysql8.2.0,配置好环境变量,在命令提示符中以管理员的身份初始化并成功启动mysql数据库。前期因为以前的mysql没有卸载干净,导致mysql一直无法启动服务。所以一定要保证以前的mysql卸载干净才能重新安装,以前没有安装过的......
  • python题目:把JSON字符串里面的数据进行替换【杭州多测师_王sir】
    name ,时间戳,value这三个值要变 "tags":[{"values":[{"value": 43.6525,"quality": 192,"timestamp": 00}],"name": "/system/Template_2/Instance_8/system/Property_10",“type”: 12}]} import randomimp......
  • python之unicode和encode
    Python中有两种默认的字符串:str和unicode。在Python中一定要注意区分“Unicode字符串”和“unicode对象”的区别。后面所有的“unicode字符串”指的都是python里的“unicode对象”。事实上在Python中并没有“Unicode字符串”这样的东西,只有“unicode”对象。一个传统意义上的un......
  • python 中文编码
      当py文件的编码为utf-8的时候。代码中需要添加#coding:utf-8。脚本中的中文,在运行过程不会报错。#-*-coding:utf-8-*-  当py文件设置为utf-8,而显示设置代码编码为#coding:936。则会出现ncodingproblem:cp936withBOM的错。这个时候,将py文件的编码改为ANSI即可。 ......
  • python中setup.py怎么使用(部署工具)
    `setup.py`是一个用于构建和安装Python包的脚本。它是用于打包、发布和分发你的Python项目的关键文件之一。以下是使用`setup.py`的一般步骤:1.创建`setup.py`文件:在项目的根目录下创建一个名为`setup.py`的文本文件。2.导入`setuptools`模块:在`setup.py`文件......
  • python ASCII字符的实用程序 curses.ascii 库的安装使用
    pythonASCII字符的实用程序curses.ascii库的安装使用https://www.lfd.uci.edu/~gohlke/pythonlibs/下载对自己电脑配置的WHL文件,并安装,比如我用的是curses‑2.2+utf8‑cp27‑cp27m‑win_amd64.whlpipinstallcurses‑2.2+utf8‑cp27‑cp27m‑win_amd64.whlPython代码中......
  • Effective Python 编写高质量Python代码的59个有效方法----读书笔记
    第二条遵循PETP8风格指南PEP8指南PythonEnhancementProposal#8使用space(空格)来表示缩进,而不要用tab(制表符)和与法相关的每一层缩进都用4个空格来表示每行的字符数不应超过79对于占据多行的长表达式来说,除了首行之外的其余各行都应该在通常的缩进级别至上再加4个空格......
  • python 如何优雅的使用retrying进行重试请求
    retrying模块一、简介retrying是一个python的重试包,可以用来自动重试一些可能运行失败的程序段,retrying提供一个装饰器函数retry,被装饰的函数就会在运行失败的情况下重新执行,默认只要一直报错就会不断重试安装:pipinstallretrying二、使用方法1、无参数使用r......