本文介绍了八度Fontconfig错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用.

当我尝试生成绘图时,收到以下消息:

When I try to generate a plot, I get the following message:

Fontconfig error: Cannot load default config file
warning: could not match any font: *-normal-normal-10
warning: called from
    axes at line 66 column 10
    gca at line 58 column 9
    newplot at line 148 column 8
    surf at line 70 column 9
    sombrero at line 65 column 5

然后我会收到一系列以下消息:

I then get a long series of the following messages:

warning: ft_render: unable to load appropriate font
warning: could not match any font: *-normal-normal-10

通常情节出现一次,但是如果我再次调用它,则Octave退出并显示以下消息.

Usually the plot appears once, but if I call it again then Octave quits with the following message.

panic: Segmentation fault: 11 -- stopping myself...
attempting to save variables to 'octave-workspace'...
warning: unable to open 'octave-workspace' for writing...
warning: called from
    __gnuplot_drawnow__>gnuplot_trim_term at line 368 column 10
    __gnuplot_drawnow__>gnuplot_set_term at line 119 column 20
    __gnuplot_drawnow__ at line 84 column 16
Segmentation fault: 11

在讨论类似错误时,我经常看到对/etc/fonts/fonts.conf的引用.我的/etc目录不包含fonts子目录.这可能是问题的根源,但我不知道如何解决.当我运行brew install fontconfig时,得到Warning: fontconfig-2.11.1_1 already installed.当我运行sudo find / -name fonts.conf时,会得到/opt/X11/lib/X11/fontconfig/fonts.conf.

In discussions of similar errors I have often seen references to /etc/fonts/fonts.conf. My /etc directory does not contain a fonts subdirectory. This may be the source of the problem, but I do not know how to fix it. When I run, brew install fontconfig, I get Warning: fontconfig-2.11.1_1 already installed. When I run sudo find / -name fonts.conf, I get /opt/X11/lib/X11/fontconfig/fonts.conf.

brew doctor会产生以下警告,这些警告可能是相关的,我不知道如何解决(未卸载Anaconda):

brew doctor produces the following warnings, which may be relevant and which I do not know how to fix (short of uninstalling Anaconda):

Warning: Anaconda is known to frequently break Homebrew builds, including Vim
and MacVim, due to bundling many duplicates of system and Homebrew-available
tools.

If you encounter a build failure please temporarily remove Anaconda
from your $PATH and attempt the build again prior to reporting the
failure to us. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
    /Users/greg/anaconda/bin/curl-config
    /Users/greg/anaconda/bin/freetype-config
    /Users/greg/anaconda/bin/libdynd-config
    /Users/greg/anaconda/bin/libpng-config
    /Users/greg/anaconda/bin/libpng16-config
    /Users/greg/anaconda/bin/python-config
    /Users/greg/anaconda/bin/python2-config
    /Users/greg/anaconda/bin/python2.7-config
    /Users/greg/anaconda/bin/xml2-config
    /Users/greg/anaconda/bin/xslt-config

我正在运行OS X 10.11.3(El Capitan).

I am running OS X 10.11.3 (El Capitan).

推荐答案

实际上,这不是Octave的问题,而是其复杂的设置和其他实用程序(尤其是fontconfig)的配置错误.

Actually, it's not an issue of Octave, but of its complicated setup and misconfiguration of other utilities (especially fontconfig).

为了正常工作,您需要手动设置fontconfig的路径,这样它就不会在不适当的目录中查找字体(/etc/fonts适用于Linux安装,但是OS X XQuartz放在不同的位置).

For proper work you need to set manually path for fontconfig, so it wouldn't look for fonts in inappropriate directory (/etc/fonts works for Linux installations, but OS X XQuartz goes to different place).

您应该运行命令export FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfig以正确的方式设置fontconfig.另外,您可以将export FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfig行添加到~/.bash_profile并重新启动终端,因此您不再需要运行此命令.

You should run command export FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfig to setup fontconfig proper way. Also you can add line export FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfig to your ~/.bash_profile and restart your terminal, so you don't need to run this command anymore.

这篇关于八度Fontconfig错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 10:42