yum的使用

最后发布时间:2022-07-06 13:30:14 浏览量:
(base) [wangyang@s2 yum.repos.d]$ yum makecache 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>

  • Display your currently installed software repositories enabled or disabled and the status of each:
yum repolist all
  • Find out what package a particular file belongs to:
yum provides /usr/bin/ssh
  • Find the dependencies of a specific package:
yum deplist ImageMagick
  • Install an RPM downloaded elsewhere using yum to solve dependencies:
yum localinstall package.rpm 
  • 查看当前yum源提供了哪些版本的docker
yum list docker-ce --showduplicates | sort -r

docker-ce.x86_64            3:19.03.9-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.8-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.7-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.6-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.5-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.4-3.el7                     docker-ce-stable
  • 以下命令都可以实现安装指定版本的docker
yum install docker-ce-3:19.03.8-3.el7.x86_64
yum install docker-ce-19.03.8-3.el7
yum install docker-ce-19.03.8-3.el7.x86_64
yum install docker-ce-3:19.03.8-3.el7.x86_64
yum install 3:docker-ce-19.03.8-3.el7.x86_64

解决依赖

图片alt

图片alt

https://pkgs.org/search/?q=gdal

图片alt

图片alt

图片alt

图片alt

已经安装还是error: gdal-config not found

图片alt

图片alt

 sudo ln -s /usr/local/gdal/2.2.4/bin/gdal-config-64 gdal-config

sudo ldconfig -p | grep libproj

(using remotes::install_github('r-spatial/sf', configure.args='--with-proj-lib=/usr/local/lib/')

question

warning: /var/cache/yum/x86_64/7/sclo/packages/devtoolset-8-toolchain-8.1-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f2ee9d55: NOKEY
Retrieving key from http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7


The GPG keys listed for the "CentOS-7 - sclo - mirrors.aliyun.com" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


 Failing package is: devtoolset-8-toolchain-8.1-1.el7.x86_64
 GPG Keys are configured as: http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
yum install {package-name} --nogpgcheck

https://codingbee.net/uncategorized/yum-error-public-key-for-rpm-is-not-installed

参考

https://centoshelp.org/resources/commands/yum-commands/