CentOS and fontconfig: Cannot load default config file

淺唱寂寞╮ 提交于 2019-12-24 16:39:50

问题


I'm getting following error when using imagick:

Fontconfig error: Cannot load default config file 

My script is working but i would like to fix this (is filling up log file).

OS is:

# cat /etc/redhat-release
CentOS release 5.10 (Final)

I was looking trough internet little bit and this is causing problem:

access("/etc/fonts/fonts.conf", R_OK)   = -1 ENOENT (No such file or directory)

Folder exists:

# ls /etc/fonts/ -all
total 64
drwxr-xr-x  4 root root  4096 Jul  9  2010 ./
drwxr-xr-x 86 root root 12288 Jan 13 00:48 ../
drwxr-xr-x  2 root root  4096 Jan  3  2012 conf.avail/
drwxr-xr-x  2 root root  4096 Apr 14  2013 conf.d/
-rw-r--r--  1 root root  5239 Jan 12  2008 fonts.conf
-rw-r--r--  1 root root  6907 Jan 12  2008 fonts.dtd

But i see only this folder via root account, other account under with script is run doesn't see this folder. Permissions looks fine for me, but not so experienced with linux.

Account under with script is run is created with WHM.

Please help :)


回答1:


I manage to solve my problem. chroot was making trouble.

I need to:

  • log with root account
  • find jailed environment of account on with i run script (in my case /home/virtfs/[username])
  • to create folder where i will mount real stuff mkdir /home/virtfs/[username]/etc/fonts
  • to mount /etc/fonts to this folder: mount --bind /etc/fonts /home/virtfs/[username]/etc/fonts


来源:https://stackoverflow.com/questions/21100787/centos-and-fontconfig-cannot-load-default-config-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!