Bug 4065 - 本地升级失败,libdnf
Summary: 本地升级失败,libdnf
Status: RESOLVED WONTFIX
Alias: None
Product: Anolis OS 7
Classification: Anolis OS
Component: OsMigration (show other bugs) OsMigration
Version: 7.9
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: yunqi-zwt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-15 11:30 UTC by zuoshichun
Modified: 2023-02-24 17:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zuoshichun 2023-02-15 11:30:35 UTC
Description of problem:
搭建本地yum源,本地是centos7.9,升级为anolis7.9,失败
如果使用在线yum源方式,则可以成功。

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. 搭建本地yum源,同步好yum仓库
2. 运行centos2anolis.py -l
3. 报错,导致升级失败

Actual results:
......
  Verifying  : systemd-libs-219-78.el7.x86_64                                                                    5/6 
  Verifying  : systemd-219-78.el7.x86_64                                                                         6/6 

Removed:
  systemd.x86_64 0:219-78.el7        systemd-libs.x86_64 0:219-78.el7        systemd-sysv.x86_64 0:219-78.el7       

Installed:
  systemd.x86_64 0:219-78.an7.7      systemd-libs.x86_64 0:219-78.an7.7      systemd-sysv.x86_64 0:219-78.an7.7     

Complete!
Switch successful. Syncing with Anolis OS repositories.
Distro sync
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package(s) libdnf available, but not installed.
No packages marked for update
Loaded plugins: fastestmirror


Error getting repository data for Plus, repository not found
Could not automatically sync with Anolis OS repositories.
        Check the output of 'yum distro-sync' to manually resolve the issue.
After you resolve the issue, Please use 'python3 centos2anolis.py -c ' to continue migration

Expected results:


Additional info:
Comment 1 yunqi-zwt alibaba_cloud_group 2023-02-24 14:39:54 UTC
需要配置 extra repo,猜测你没有配置 centos extra repo, 无法安装libdnf
Comment 2 zuoshichun 2023-02-24 17:56:53 UTC
此问题已经解决。
发现并不是yum源的问题,我配置有extras,还甚至有Plus,都不行。
后来发现更改命令方式就可以了。
本地环境执行迁移
centos2anolis.py -l
上述命令是默认迁移到带 ANCK 内核的龙蜥OS,如果你想迁移到带 RHCK 内核的龙蜥OS请执行下面的命令进行迁移
centos2anolis.py -l --rhck

注意:本地迁移时,第一个命令会失败,出错信息如下。
只能使用第2个命令(带RHCK内核的)才能正常执行。