【问题标题】:Unable to find and install ImageMagick on CentOS 8在 CentOS 8 上无法找到并安装 ImageMagick
【发布时间】:2021-08-14 13:25:05
【问题描述】:

我无法在 CentOS 8 64 位服务器上安装 ImageMagick 和 ImageMagick-devel。它应该很简单:

dnf 安装 ImageMagick ImageMagick-devel

当我这样做时,我得到:

上次元数据过期检查:0:02:53 前,2021 年 5 月 26 日星期三 11:48:26 AM CEST。 所有匹配都被排除过滤参数过滤掉:ImageMagick 所有匹配都被排除过滤参数过滤掉:ImageMagick-devel 错误:无法找到匹配项:ImageMagick ImageMagick-devel

我已经完成了:

dnf 安装https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y

已安装并启用。当我往里看时

dnf repository-packages epel 列表

没有列出任何 ImageMagick 包。

如何解决这个问题并使用 dnf 安装 ImageMagick 和 ImageMagick-devel?

我的转发器是:

  • appstream:CentOS Linux 8 - AppStream
  • baseos:CentOS Linux 8 - BaseOS
  • epel:Enterprise Linux 8 - x86_64 的额外软件包
  • epel-debuginfo:Enterprise Linux 8 - x86_64 - 调试的额外软件包
  • epel-modular:Enterprise Linux Modular 8 - x86_64 的额外软件包
  • epel-source:企业 Linux 8 的额外软件包 - x86_64 - 源代码
  • 附加功能:CentOS Linux 8 - 附加功能
  • litespeed:用于 CentOS 8 - x86_64 的 LiteSpeed 技术存储库
  • litespeed-update:CentOS 8 - x86_64 的 LiteSpeed 技术更新存储库
  • powertools:CentOS Linux 8 - PowerTools
  • remi-modular:Remi 的适用于 Enterprise Linux 8 - x86_64 的模块化存储库
  • remi-safe:用于 Enterprise Linux 8 - x86_64 的 Safe Remi 的 RPM 存储库
  • yarn:纱线存储库

dnf repository-packages epel 列表的输出 | grep 图片

  • OpenImageIO.x86_64 2.1.20.0-1.el8 epel
  • OpenImageIO-devel.x86_64 2.1.20.0-1.el8 epel
  • OpenImageIO-iv.x86_64 2.1.20.0-1.el8 epel
  • OpenImageIO-utils.x86_64 2.1.20.0-1.el8 epel
  • libAfterImage.x86_64 1.20-22.el8 epel
  • libAfterImage-apps.x86_64 1.20-22.el8 epel
  • libAfterImage-devel.x86_64 1.20-22.el8 epel
  • perl-GD-SecurityImage.noarch 1.75-4.el8 epel
  • perl-Image-Base.noarch 1.17-15.el8 epel
  • perl-Image-ExifTool.noarch 12.16-3.el8 epel
  • perl-Image-Info.no​​arch 1.41-8.el8 epel
  • perl-Image-Size.noarch 3.300-16.el8 epel
  • perl-Image-Xbm.noarch 1.10-11.el8 epel
  • perl-Image-Xpm.noarch 1.13-10.el8 epel

dnf repository-packages epel 列表的输出 | grep 图片

  • freeimage.x86_64 3.17.0-4.el8 epel
  • freeimage-devel.x86_64 3.17.0-4.el8 epel
  • freeimage-plus.x86_64 3.17.0-4.el8 epel
  • freeimage-plus-devel.x86_64 3.17.0-4.el8 epel
  • kf5-kimageformats.x86_64 5.68.0-1.el8 epel
  • kiwi-systemdeps-disk-images.x86_64 9.23.34-1.el8 epel
  • kiwi-systemdeps-image-validation.x86_64 9.23.34-1.el8 epel
  • libimagequant.x86_64 2.12.5-1.el8 epel
  • libimagequant-devel.x86_64 2.12.5-1.el8 epel
  • python3-openimageio.x86_64 2.1.20.0-1.el8 epel
  • qt5-qtimageformats-doc.noarch 5.12.3-1.el8 epel
  • root-graf-asimage.x86_64 6.22.08-1.el8 epel

【问题讨论】:

  • epel 在您的转发列表中。 dnf repository-packages epel list 显示什么?你试过dnf clean all然后dnf makecache吗?
  • 是的,我已经运行了 dnf clean all 和 dnf makecache。我已将 dnf repository-pacakges epel list 的输出添加到我的原始帖子中。我添加了一个 grep 命令,以缩小列表范围。
  • 我找到了罪魁祸首。我正在进行服务器迁移,在我的 /etc/dnf/dnf.conf 中有 exclude=mysql*,ImageMagick*,GraphicsMagick* 。我已删除排除项,现在可以找到 ImageMagick。我觉得自己好傻。谢谢你的帮助! @GoinOff
  • 我已经多次像这样在脚上开枪了。很高兴你发现了问题。我通常会说“D'ohhhh”

标签: centos imagemagick centos8


【解决方案1】:

在 CentOS 8 中有点蹩脚,默认情况下,许多所需的存储库默认情况下未启用,并且软件包现在分散在不同的存储库中,这使得生活在 a$$ 中变得更加痛苦而不是更轻松..

ImageMagick 包在 epel 仓库中

[root@test35 map]# repoquery -i ImageMagick-devel
Last metadata expiration check: 0:23:13 ago on Wed 26 May 2021 04:52:14 AM PDT.
Name         : ImageMagick-devel
Version      : 6.9.10.86
Release      : 1.el8
Architecture : x86_64
Size         : 126 k
Source       : ImageMagick-6.9.10.86-1.el8.src.rpm
Repository   : epel
Summary      : Library links and header files for ImageMagick app development
URL          : http://www.imagemagick.org/
License      : ImageMagick
Description  : ImageMagick-devel contains the library links and header files
             : you'll need to develop ImageMagick applications. ImageMagick is
             : an image manipulation program.
             :
             : If you want to create applications that will use ImageMagick code
             : or APIs, you need to install ImageMagick-devel as well as
             : ImageMagick. You do not need to install it if you just want to
             : use ImageMagick, however.

要启用包含许多典型服务器所需软件包的流行存储库,请运行以下命令

yum install epel-release javapackages-tools
yum config-manager --set-enabled powertools

重建 yum 或 dnf:

yum clean all
yum makecache
yum repolist

[root@localhost ~]# yum repolist
                     repo id            repo name
                     appstream          CentOS Linux 8 - AppStream
                     baseos             CentOS Linux 8 - BaseOS
                     epel               Extra Packages for Enterprise Linux 8 - x86_64
                     epel-modular       Extra Packages for Enterprise Linux Modular 8 - x86_64
                     extras             CentOS Linux 8 - Extras
                     powertools         CentOS Linux 8 - PowerTools

                List of rpms in epel where ImageMagick-devel is located:

                    yum repo-pkgs epel list

[root@test35 map]# dnf clean all
49 files removed
[root@test35 map]# dnf makecache
CentOS Linux 8 - AppStream                      3.9 MB/s | 6.3 MB     00:01
CentOS Linux 8 - BaseOS                         1.2 MB/s | 2.3 MB     00:01
CentOS Linux 8 - Extras                          27 kB/s | 9.6 kB     00:00
CentOS Linux 8 - PowerTools                     1.6 MB/s | 2.0 MB     00:01
Extra Packages for Enterprise Linux Modular 8 - 453 kB/s | 610 kB     00:01
Extra Packages for Enterprise Linux 8 - x86_64  4.2 MB/s | 9.4 MB     00:02
Last metadata expiration check: 0:00:01 ago on Wed 26 May 2021 06:09:19 AM PDT.
Metadata cache created.

[root@test35 map]# dnf repository-packages epel list|grep ImageMagick
ImageMagick.x86_64                                        6.9.10.86-1.el8                                 epel
ImageMagick-c++.x86_64                                    6.9.10.86-1.el8                                 epel
ImageMagick-c++-devel.x86_64                              6.9.10.86-1.el8                                 epel
ImageMagick-devel.x86_64                                  6.9.10.86-1.el8                                 epel
ImageMagick-doc.x86_64                                    6.9.10.86-1.el8                                 epel
ImageMagick-libs.x86_64                                   6.9.10.86-1.el8                                 epel
ImageMagick-perl.x86_64                                   6.9.10.86-1.el8       

【讨论】:

  • 感谢您的详细解答。我没有安装 repoquery 并且 dnf install repoquery,没有工作(似乎与 ImageMagick 的问题相同)。我做了你列出的所有其他步骤。不幸的是,“dnf repository-packages epel list|grep ImageMagick”什么也没返回。
  • 您可以安装yum install yum-utils 进行repoquery。 dnf repolist 向您展示了什么?
  • 你应该在你的 repolist 中看到 epelepel-modular
  • 你也可以通过运行dnf clean all,dnf makecache,来重建
  • 谢谢你的额外命令。我设法安装了 repoquery。当我运行该命令时,它什么也不返回。我跑了 dnf clean all 和 dnf makecache。我将我当前的 repolist 添加到我的原始帖子中。
猜你喜欢
  • 1970-01-01
  • 2022-01-08
  • 2020-06-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-02-02
  • 2013-10-18
  • 2014-01-20
相关资源
最近更新 更多