0%

CentOS 7 如何安装 atom.x86_64.rpm

ATOM官网上下载.rpm文件后解压到本地

$ rpm -ivh atom.x86_64.rpm
错误:依赖检测失败:

1
libXss.so.1()(64bit) 被 atom-1.14.4-0.1.x86_64 需要

可见安装缺少依赖包。

解决

1
2
3
4
5
6
7
8
9
$ sudo yum localinstall atom.x86_64.rpm

balabala...
已安装:

atom.x86_64 0:1.14.4-0.1

作为依赖被安装:
libXScrnSaver.x86_64 0:1.2.2-6.1.el7

完毕!
man yum可知

localinstall
Is used to install a set of local rpm files. If required the
enabled repositories will be used to resolve dependencies. Note
that the install command will do a local install, if given a
filename. This command is maintained for legacy reasons only.

即yum localinstall可以帮助安装本地rpm包,并解决依赖问题。
该方法也可以用来解决centos7安装google chrome出现的问题。