Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Existing lock /var/run/yum.pid: another copy is running as pid 2890. Another app is currently holding the yum lock; waiting for it to exit... The other application is: PackageKit
时间: 2024-02-23 11:57:02 浏览: 291
这是一个 yum 命令的错误提示,主要是由于 yum 正在运行中,可能是由于 PackageKit 或其它进程正在使用 yum。建议等待当前进程结束后再尝试运行 yum 命令。如果问题仍然存在,可以尝试杀死正在运行的进程,或者重启系统来解决问题。另外,关于“Repository base is listed more than once in the configuration”等提示,可能是由于配置文件中重复定义了某些仓库,需要修改配置文件来解决。
相关问题
怎么解决Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Existing lock /var/run/yum.pid: another copy is running as pid 2890. Another app is currently holding the yum lock; waiting for it to exit... The other application is: PackageKit
针对“Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration”这些提示,建议使用编辑器打开 yum 的配置文件,一般为 /etc/yum.conf 或 /etc/yum.repos.d/*,找到其中重复定义的仓库并删除,然后保存修改即可。
针对“Existing lock /var/run/yum.pid: another copy is running as pid 2890. Another app is currently holding the yum lock; waiting for it to exit... The other application is: PackageKit”这个提示,说明 PackageKit 正在占用 yum 进程,建议等待 PackageKit 进程结束后再尝试运行 yum 命令。如果等待时间过长,可以使用以下命令杀死 PackageKit 进程:
```bash
sudo killall -9 PackageKit
```
然后再尝试运行 yum 命令即可。如果问题仍然存在,可以尝试重启系统。
Repository extras is listed more than once in the configuration Repository base is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Repository PowerTools is listed more than once in the configuration Repository AppStream is listed more than once in the configuration
这个问题意味着您的软件源配置文件中包含了重复的仓库(repository)配置。您需要删除这些重复的配置,以解决这个问题。
您可以按照以下步骤来解决这个问题:
1. 以 root 用户身份登录到您的 CentOS 8 系统。
2. 编辑您的仓库配置文件 `/etc/yum.repos.d/CentOS-Base.repo`。
```
sudo vi /etc/yum.repos.d/CentOS-Base.repo
```
3. 搜索文件中的重复配置。例如,搜索 `extras`:
```
/extras
```
4. 删除重复的配置。
删除多余的配置行,只保留一行即可。例如,如果您发现 `extras` 重复了两次,则只需保留其中一行。
5. 重复步骤 3 和步骤 4,直到删除所有重复的配置。
6. 保存文件并退出编辑器。
7. 运行以下命令以清除缓存并重新生成缓存:
```
sudo yum clean all
sudo yum makecache
```
完成后,您的 CentOS 8 系统应该不再包含重复的软件源配置,您可以正常使用 `yum` 命令来更新和安装软件包了。
阅读全文