Octave imread function

纵然是瞬间 提交于 2019-12-04 03:32:31

Following these steps worked for me [Author: Christoffer Cronström (hymyly)]:

Install the dev packages needed to build octave.

sudo apt-get build-dep octave

Get the official source package. Do this in a clean directory, because it will get polluted.

cd ~/some/suitable/directory
apt-get source octave

Build it. This took roughly an hour for me.

cd octave-3.8.2
dpkg-buildpackage

Either run it from the build directory:

./run-octave

...or most preferably install it over the official octave:

cd ..
sudo dpkg --install octave_3.8.2-4_amd64.deb

From: https://bugs.launchpad.net/ubuntu/+source/octave/+bug/1372202

How did you instal Octave? The error suggests that you're missing GraphicsMagick C++ interface (package libgraphicsmagick++3) but

  • if you installed Octave from Ubuntu's package manager you should not have had this problem; * if you compiled it yourself, Octave should have disabled imread completely and you'd have a very different error message.

So my guess is that you build it yourself, either with:

  • your own build of GraphicsMagick++ which are not being loaded anymore, you may need to add their path to the dynamic linker load path (either on /etc/ld.so.conf.d./graphicsmagick or define LD_LIBRARY_PATH);

  • the libraries from the package manager which you have since accidentally removed (since you did not install Octave from the repositories, your package manager will not know that libgraphicsmagick++ is installed for a reason).

Either way, the solution is easy. Install Octave from Ubuntu's package manager. One of the main reasons package managers exist is to avoid this type of problems, i.e., missing dependencies.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!