27

こんにちは、最近、最新の Snow Leopard アップデートをダウンロードしました。次に、コンピューターに何ヶ月もインストールされているOctaveを使用して何かをプロットしようとしました(そして、プロットはずっと機能していました)更新をインストールしてからでも、octaveを使用してプロットしようとすると、次のエラーが発生します。

dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
  Referenced from: /usr/X11R6/lib/libfontconfig.1.dylib
  Reason: Incompatible library version: libfontconfig.1.dylib requires version 13.0.0 or later, but libfreetype.6.dylib provides version 10.0.0
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
  Referenced from: /usr/X11R6/lib/libfontconfig.1.dylib
  Reason: Incompatible library version: libfontconfig.1.dylib requires version 13.0.0 or later, but libfreetype.6.dylib provides version 10.0.0
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 71:   865 Trace/BPT trap          GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}" DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}" DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-4.2.6" "$@"
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 71:   871 Trace/BPT trap          GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}" DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}" DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-4.2.6" "$@"
error: you must have gnuplot installed to display graphics; if you have gnuplot installed in a non-standard location, see the 'gnuplot_binary' function

どうすればいいのか本当にわかりません。私はここで私のリーグから抜け出しています。

4

10 に答える 10

78

「MacOSXユーザー向けのメモ」はOctaveホームページに表示されなくなり、Marcoの投稿で説明されている回避策も機能しませんでしたが、これは機能しました。

Open /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot in a text
editor. Use the editor search-and-replace feature to replace
"DYLD_LIBRARY_PATH" with "DYLD_FALLBACK_LIBRARY_PATH". There are four
instances that need to be replaced.

これは、OctaveMacOSXBinaryのreadmeからのものです。これはLionユーザー向けであると書かれていますが、私は10.6.8を実行していて、うまくいきました。

于 2012-03-22T00:42:35.510 に答える
17

私は最近、自作を使用して Lion で Octave と GNUplot をビルドしました。うまくいくようです。ここにいくつかのメモがあります

  1. AppStore および HomeBrew から Xcode をインストールします (リンクを参照) 。

  2. 「brew install octave」を実行し、graphicsmagick がコンパイルに失敗するまで待ちます

  3. コマンド「brew install --use-clang --HEAD graphicsmagick」を実行します。Mercurial のインストールを求められる場合がありますが、指示に従ってください。Fortran のインストールを求められる場合もありますので、「brew install gfortran」と入力してください。

  4. コマンド「brew install octave」を再度実行します

  5. Aquaterm をインストールする

  6. 「brew install gnuplot」を実行します

これで、最新の Octave がインストールされました。ターミナルからオクターブと入力するだけです

インストールをテストするには、Octave コマンド プロンプトで次のコマンドを実行します。

setenv("GNUTERM", "x11");
x = linspace(-10, 10, 100);
y = sin(x);
plot(x,y);
于 2011-10-09T22:21:16.053 に答える
9

http://octave.sourceforge.net/にある Mac OS X 10.6 のユーザー向けの注意事項を参照してください。この変更により、10.5.8 でも問題が解決されます。

于 2010-11-18T12:37:14.833 に答える
5

OSX 10.6.5 で freetype を更新しました。freetype とリンクしている fontconfig は、この新しいバージョンを必要としています。gnuplot の開発者が DYLD_LIBRARY_PATH を設定しているため、gnuplot がロードに失敗しています。これにより、libfontconfig が libfreetype を使用するように強制されますが、これはできません。

これは Gnuplot.app のバグです ... 開発者は製品を出荷する際に DYLD_LIBRARY_PATH を設定してはいけませ!

于 2010-11-16T18:36:04.707 に答える
1

MacPortsを使用してもかまわない場合は、次のコマンドでオクターブをインストールできます。そしてそれは64ビットバージョンになります。

sudo port install octave-devel
于 2012-05-21T15:15:27.087 に答える
1

上記を試しましたが、役に立ちませんでした。問題の原因は、Octave.app のインストールに付属する gnuplot のバージョンにあるようです。

「brew」を使用して gnuplot を直接インストールし、アプリケーション フォルダから gnuplot を削除しました。その変更が行われると、Octave は正しい依存関係でコンパイルされた新しいバージョンの gnuplot を見つけることができました。

于 2012-02-06T07:45:49.693 に答える
1

I had the same problem and took me a while to find the "note for users of Mac OS X 10.6". I copy them here:

NOTES FOR SNOW LEOPARD USERS

1 - mkoctfile

Since OSX 10.6 the Apple shipped version of gcc builds by default 64bit binaries As the libraries included with Octave.app version 3.2.3 are 32bit, you need to apply the following patch in order for mkoctfile to work:

1.1) open the folder /Applications in the finder 1.2) right-click on Octave.app and select "show package contents" 1.3) navigate to /Applications/Octave.app/Contents/Resources/bin 1.4) right-click on the file "mkoctfile" and select "Open with -> Other ... -> TextEdit.app" 1.5) right after the line:

 # along with this program; If not, see <http://www.gnu.org/licenses/>.

add the lines

 CFLAGS="-m32 ${CFLAGS}"
 FFLAGS="-m32 ${FFLAGS}"
 CPPFLAGS="-m32 ${CPPFLAGS}"
 CXXFLAGS="-m32 ${CXXFLAGS}"
 LDFLAGS="-m32 ${LDFLAGS}" 

and save.

2 - Gnuplot.app

An update to system libraries introduced with OSX 10.6.5 has broken the functionality of the Gnuplot.app included with the Octave.app distribution, in order to use Gnuplot.app on OSX 10.6.5 and later, you can use the fix described below:

2.1) open the folder /Applications in the finder 2.2) right-click on Gnuplot.app and select "show package contents" 2.3) navigate to /Applications/Gnuplot.app/Contents/Resources/bin 2.4) right-click on the file "gnuplot" and select "Open with -> Other ... -> TextEdit.app" 2.5) change the line:

 DYLD_LIBRARY_PATH="${ROOT}/lib:${DYLD_LIBRARY_PATH}"

to

 DYLD_LIBRARY_PATH="${ROOT}/lib"

and save.

NOTES FOR LEOPARD USERS

An update to system libraries introduced with OSX 10.5.8 has broken the functionality of the Gnuplot.app included with the Octave.app distribution, in order to use Gnuplot.app on OSX 10.5.8 and later, you can use the same fix described above for OSX 10.6.5.

于 2011-03-23T03:32:23.657 に答える