[实践OK]CentOS 7 使用 yum localinstall命令安装 bcloud。及yum-config-manager命令找不到等。yum-config-manager命令找不到的解决方法:yum -y install yum-utils

jackxiang 2017-6-24 12:58 | |
yum-config-manager命令找不到的解决方法:yum -y install yum-utils
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

背景:百度云是个好东西,Linux 下能命令行使用是最好不过的了。

yum-config-manager --add-repo=https://copr.fedoraproject.org/coprs/mosquito/myrepo/repo/epel-$(rpm -E %?rhel)/mosquito-myrepo-epel-$(rpm -E %?rhel).repo
-bash: yum-config-manager: 未找到命令


系统默认没有安装这个命令,这个命令在yum-utils 包里,可以通过命令yum -y install yum-utils 安装就可以了。
步骤一:先找到软件包安装路径
whereis yum-config-manager
yum-config-manager: /usr/bin/yum-config-manager /usr/share/man/man1/yum-config-manager.1.gz

步骤二:再根据RPM包的命令传入程序路径后反查到这个软件所属于哪个RPM包:
rpm -qf /usr/bin/yum-config-manager
yum-utils-1.1.31-40.el7.noarch

================================================================
CentOS 7 使用如下命令安装 bcloud:
# yum-config-manager --add-repo=https://copr.fedoraproject.org/coprs/mosquito/myrepo/repo/epel-$(rpm -E %?rhel)/mosquito-myrepo-epel-$(rpm -E %?rhel).repo
# yum localinstall http://li.nux.ro/download/nux/dextop/el$(rpm -E %rhel)/x86_64/nux-dextop-release-0-2.el$(rpm -E %rhel).nux.noarch.rpm
# yum install bcloud


来自:http://jingyan.baidu.com/article/4dc40848b761cbc8d846f172.html

实践如下:
yum-config-manager --add-repo=https://copr.fedoraproject.org/coprs/mosquito/myrepo/repo/epel-$(rpm -E %?rhel)/mosquito-myrepo-epel-$(rpm -E %?rhel).repo
已加载插件:fastestmirror
adding repo from: https://copr.fedoraproject.org/coprs/mosquito/myrepo/repo/epel-7/mosquito-myrepo-epel-7.repo
grabbing file https://copr.fedoraproject.org/coprs/mosquito/myrepo/repo/epel-7/mosquito-myrepo-epel-7.repo to /etc/yum.repos.d/mosquito-myrepo-epel-7.repo
repo saved to /etc/yum.repos.d/mosquito-myrepo-epel-7.repo

关闭打开仓库:
yum-config-manager --disable extras
extras之前没有enabled = *这项,而运行后,就有这一项了:
[extras]
  name=CentOS-$releasever – Extras
  baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/
  gpgcheck=1
  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  enabled = 0
打开刚关闭的仓库:
yum-config-manager --enable extras
[extras]
name=CentOS-$releasever – Extras
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled = 1


yum localinstall http://li.nux.ro/download/nux/dextop/el$(rpm -E %rhel)/x86_64/nux-dextop-release-0-2.el$(rpm -E %rhel).nux.noarch.rpm
依赖关系解决

=========================================================================================================================================================================================
Package                                     架构                            版本                                  源                                                               大小
=========================================================================================================================================================================================
正在安装:
nux-dextop-release                          noarch                          0-2.el7.nux                           /nux-dextop-release-0-2.el7.nux.noarch                          3.5 k
为依赖而安装:
epel-release                                noarch                          7-9                                   epel                                                             14 k

事务概要
=========================================================================================================================================================================================
安装  1 软件包 (+1 依赖软件包)

总计:18 k
安装:
  nux-dextop-release.noarch 0:0-2.el7.nux                                                                                                                                                

作为依赖被安装:
  epel-release.noarch 0:7-9                                                                                                                      



yum clean all


yum install bcloud
已加载插件:fastestmirror
Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo/epel-7-x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
正在尝试其它镜像。
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/

nux-dextop                                                                                                                                                        | 2.9 kB  00:00:00    
nux-dextop/x86_64/primary_db                                                  44% [=============================-                                      ]  32 kB/s | 745 kB  00:00:29 ETA




http://www.linuxdown.net/soft/2015/0127/3799.html
https://github.com/houtianze/bypy/blob/master/README.md

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/9266/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!


最后编辑: jackxiang 编辑于2020-6-11 15:13
评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]