首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CentOS升级软管

CentOS升级软管
EN

Server Fault用户
提问于 2020-10-18 07:27:31
回答 1查看 650关注 0票数 0

我决定将一个远程“实时”服务器从CentOS 7升级到8。按照这里的说明,https://www.tecmint.com/upgrade-centos-7-to-centos-8/进入了一个无休止的失败循环。

代码语言:javascript
复制
# dnf upgrade [or --refresh]
Error: Transaction check error:
file /usr/lib/python2.7/site-packages/six.py from install of python2-six-1.11.0-5.module_el8.2.0+381+9a5b3c3b.noarch conflicts with file from package python-six-1.9.0-2.el7.noarch
file /usr/lib/python2.7/site-packages/six.pyc from install of python2-six-1.11.0-5.module_el8.2.0+381+9a5b3c3b.noarch conflicts with file from package python-six-1.9.0-2.el7.noarch
file /usr/lib/python2.7/site-packages/six.pyo from install of python2-six-1.11.0-5.module_el8.2.0+381+9a5b3c3b.noarch conflicts with file from package python-six-1.9.0-2.el7.noarch

# dnf update --best --allowerasing
CentOS-8 - Base
CentOS-8 - Updates
CentOS-8 - Extras
CentOS-8 - Plus
Failed to synchronize cache for repo 'base', ignoring this repo.
Failed to synchronize cache for repo 'updates', ignoring this repo.
Failed to synchronize cache for repo 'extras', ignoring this repo.
Failed to synchronize cache for repo 'centosplus', ignoring this repo.
Last metadata expiration check: 0:00:38 ago on Sun 18 Oct 2020 07:20:52 AM UTC.
Error: 
Problem: The operation would result in removing the following protected packages: dnf

其他尝试会导致关于重复repos或使用镜像列表而不是baseurl的模糊消息。我在网上找不到任何解决方案,这也是我第一次使用dnf (在那次尝试之前我使用了yum )。

EN

回答 1

Server Fault用户

发布于 2020-10-18 09:51:37

您的问题与不想要的库下载包有关,请将其禁用。

禁用不需要的Repo,无法通过(作为示例)下载:

删除回购包或从repo文件夹移动到临时文件夹(作为备份)或使用订阅管理器命令:

代码语言:javascript
复制
 # subscription-manager repos --disable [repo-package]-x86_64-rpms  
 # subscription-manager repos --enable [repo-package]-x86_64-rpms

运行命令来清理缓存并再次下载元文件。

代码语言:javascript
复制
sudo dnf clean all
sudo rm -r /var/cache/dnf
sudo dnf upgrade
票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1039146

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档