web-dev-qa-db-ja.com

Octave Fontconfigエラー

here の指示に従って、Homebrewを介してOctaveをインストールしました。

プロットを生成しようとすると、次のメッセージが表示されます。

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

その後、次のような一連のメッセージが表示されます。

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

通常、プロットは一度表示されますが、もう一度呼び出すと、Octaveは次のメッセージで終了します。

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が表示されます。

brew doctorは、関連する可能性があり、修正方法がわからない(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)を実行しています。

21
gsganden

実際、それはOctaveの問題ではなく、複雑なセットアップと他のユーティリティ(特にfontconfig)の設定ミスの問題です。

適切に機能させるには、fontconfigのパスを手動で設定する必要があるため、不適切なディレクトリでフォントが検索されません(Linuxインストールでは/etc/fontsは機能しますが、OS X XQuartzは別の場所に移動します)。

Fontconfigを適切に設定するには、コマンドexport FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfigを実行する必要があります。また、export FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfig~/.bash_profile行を追加してターミナルを再起動できるため、このコマンドを実行する必要はありません。

39
OleGG

試す

brew uninstall fontconfig

brew install fontconfig --universal

xquartzがない場合、または使用したくない場合は、qtを使用できます。

brew uninstall gnuplot

brew install gnuplot --with-qt
40
Gabiden