AWS Linux-安装软件包(自动安装相关软件包)

时间:2020-01-14 21:28:43

标签: linux yum

我正在尝试在AWS Linux上安装Ted(将RTF转换为PDF Converter)。是否有任何命令可以找到并安装所有依赖包?

我尝试了以下命令,并在StackOverflow上引用了几篇文章,但这些命令均无效。

yum install -y http://ftp.nluug.nl/pub/editors/ted/ted-2.23-1.x86_64.rpm

我收到以下错误。

--> Finished Dependency Resolution

Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
           Requires: libpng15.so.15()(64bit)

Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
           Requires: libgdk-x11-2.0.so.0()(64bit)

Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
           Requires: libpng15.so.15(PNG15_0)(64bit)

Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
           Requires: gtk2

Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
           Requires: libatk-1.0.so.0()(64bit)

Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
           Requires: libgtk-x11-2.0.so.0()(64bit)

Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
           Requires: libpaper.so.1()(64bit)

Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
           Requires: libgdk_pixbuf-2.0.so.0()(64bit)

 You could try using --skip-broken to work around the problem

** Found 12 pre-existing rpmdb problem(s), 'yum check' output follows:

1 个答案:

答案 0 :(得分:0)

yum将自动解决依赖关系,但是它只能从可用存储库中下载这些依赖关系。很难确定您使用的是哪个Linux发行版(因为您使用的是yum,它是Redhat或Centos)。

大多数rpm依赖项在基本存储库中都可用,因此您只需启用它们即可。

如果您使用的是Centos 7,请创建一个新文件/etc/yum.repos.d/Centos-Base.repo并添加以下内容

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

保存文件,然后运行以下命令清理yum缓存:

yum clean all

然后尝试再次下载rpm