AWS Linux - Installing packages(自动安装依赖包)

AWS Linux - Installing packages (automatically install dependent packages)

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

我尝试了以下命令并参考了 Whosebug 上的几个帖子,但其中 none 个命令有效。

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:

yum 会自动解决依赖关系,但它只能从可用的 repo 下载这些依赖关系。很难判断您使用的 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