2016-02-07 13 views
21

hereの指示に従ってHomebrew経由でOctaveをインストールしました。Octave Fontconfigエラー

私はプロットを作成しようとすると、私は次のメッセージが出ます:

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ディレクトリには、フォントのサブディレクトリがありません。これは問題の原因かもしれませんが、私はそれを修正する方法がわかりません。私が走ったとき、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が関連する可能性があると私は(アナコンダのアンインストールの短い)を固定する方法がわからないその次の警告を生成:

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(エル・キャピタン)を実行しています。

答えて

36

実際にはOctaveの問題ではありませんが、複雑な設定や他のユーティリティ(特にfontconfig)の設定ミスがあります。

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

fontconfigを正しく設定するには、コマンドexport FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfigを実行する必要があります。また、~/.bash_profileに行export FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfigを追加して端末を再起動して、このコマンドをもう実行する必要はありません。

+1

使用することができます

brew uninstall fontconfig brew install fontconfig --universal 

を試すには、技術のこれらの種類を学ぶための効率的な方法はありますか?おそらく、私はbashプロファイルやUnix型ファイルシステムのようなものを理解するために読める本でしょうか? – gsganden

+0

残念ながら、私は何か具体的に推薦することはできません、それは経験や試行錯誤から来ています。私はエラーメッセージをグーグルグーグルでチェックし、他の人が再構成した問題を自分の設定と比較することでこの問題を解決するのに約1時間を費やした。 – OleGG

+3

これは私に束縛を助けた。注:これが動作するには、http://www.xquartz.org/がインストールされている必要があります。 – jameswilsterman

40

あなたが持っていないか、またはxquartzを使用しない場合、あなたはQT

brew uninstall gnuplot 

brew install gnuplot --with-qt 
+2

願い私はこの答えを見つける前に試した多くのことを教えてくれました。ありがとうございます –

+2

最初の2つのコマンドは私のために働いていました。ありがとうございました! – Andi

+0

gnuplot --with-qtで非推奨警告を取得しました。これはうまくいきました:brew install gnuplot --with-qt5 – bsandhu

関連する問題