安装依赖

首先使用apt-get install安装依赖。(以下包括所有推荐的可选包)

libjack0 libjack-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot libhdf5-serial-dev openjdk-7-jdk libsndfile1-dev lpr texinfo libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libsuitesparse-dev libxft-dev zlib1g-dev libfltk1.3-dev llvm-3.6-dev libgl1-mesa-dev

由于Ubuntu仓库中的GraphicsMagick的quantum depth为8,所以在上述命令中我们没有包括libgraphicsmagick++1-dev,而是通过以下步骤编译安装。

编译安装GraphicsMagick

下载GraphicsMagick并解压,然后进入其目录,执行如下命令:

$ ./configure --with-quantum-depth=32 --enable-shared --disable-static --with-magick-plus-plus=yes
$ make
$ sudo make install

编译安装Octave

为了避免如下错误:

Warning: HDF5 library not found. Octave will not be able to save or load HDF5 data files.

在configure中要指定库文件位置。之后编译安装:

$ ./configure --prefix=/opt CPPFLAGS=-I/usr/include/hdf5/serial LDFLAGS=-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial
$ make
$ sudo make install

参考资料

官方编译指南
Configure选项


DrizzleX
34 声望0 粉丝