CentOS Linux release 7.7.1908 (Core)
ImageMagick
- Version: ImageMagick 6.7.8-9 2019-08-08 Q16 http://www.imagemagick.org
状況
CentOS 6.9のシステムからCentOS 7.7へ移行を進めている。
CentOS 7.7においては、ImageMagickのconvertコマンドを実行時に下記のようなエラーが出る。
convert: unable to read font `/usr/share/fonts/default/Type1/n019003l.pfb' @ error/annotate.c/RenderFreetype/1124.
関連
似たような事例として
- A. CentOS Bug Tracker
- CentOS 7.7での不具合事例
- 対処については記載なし
- B. CentOS 7.7.1908 ImageMagick montage does not work with urw-base35-fonts replacing urw-fonts
- 対処
-
Downloaded 'urw-fonts-2.4-16.el7.noarch.rpm', then used rpm:
-
rpm -ivh --nodeps urw-fonts-2.4-16.el7.noarch.rpm
-
- 対処
対処実施
https://centos.pkgs.org/7/centos-x86_64/urw-fonts-2.4-16.el7.noarch.rpm.html
からrpmファイルを取得
$ wget http://mirror.centos.org/centos/7/os/x86_64/Packages/urw-fonts-2.4-16.el7.noarch.rpm
$ ls /usr/share/fonts/default
ls: cannot access /usr/share/fonts/default: No such file or directory
$ sudo rpm -ivh --nodeps urw-fonts-2.4-16.el7.noarch.rpm
[sudo] password for XXXXX:
Preparing... ################################# [100%]
Updating / installing...
1:urw-fonts-2.4-16.el7 ################################# [100%]
$ ls /usr/share/fonts/default
Type1
/usr/share/fonts/defaultのフォントが見えるようになった。
補足事項 > yumでは失敗 (link: yumとrpmでのパッケージ情報表示)
以前、 @tukiyo3 さんに教えていただいたパッケージ情報の表示。
https://qiita.com/7of9/items/9ab581c15fe89127f429#comment-4c0af51a3b161de40ef6
それをもとにyumからインストールしようとした。
yumでの関連パッケージを表示した。
$ yum whatprovides /usr/share/fonts/default
...
Loading mirror speeds from cached hostfile
* base: mirrors.cat.net
* epel: ftp.jaist.ac.jp
* extras: ftp.jaist.ac.jp
* updates: ftp.jaist.ac.jp
ghostscript-fonts-5.50-32.el7.noarch : Fonts for the Ghostscript PostScript interpreter
Repo : base
Matched from:
Filename : /usr/share/fonts/default
urw-fonts-2.4-16.el7.noarch : Free versions of the 35 standard PostScript fonts.
Repo : base
Matched from:
Filename : /usr/share/fonts/default
yumでインストールしようとしたが、別のものがあるとのことで失敗した。
/usr/share/fonts/defaultのフォントは見つからないまま。
$ sudo yum install urw-fonts-2.4-16.el7.noarch
...
Package urw-fonts-2.4-16.el7.noarch is obsoleted by urw-base35-fonts-20170801-10.el7.noarch which is already installed
Nothing to do
そのため、今回は上記のrpmファイル取得で対応した。