Image package on octave fails due to unsatisified dependencies - octave

I have Octave 3.8.4 installed which is the last version of Octave in repositories when i try to install image package on it
using pkg install -forge image
i got the following error message
error: the following dependencies were unsatisfied:
image needs octave >= 4.0.0

Related

Error,when installing a new package in Octave

I tried to install in Octave these packages:
bim
image
But setup is not finished, because this error:
Before starting to install packages, I updated the pkg itself with the command
pkg update
After a long update, everything also gives an installation error.
Also reinstalled Octave, the error does not disappear
I don't use Octave, but based on the instructions on https://octave.sourceforge.io/, you should try
pkg install -forge image
pkg install -forge bim
to install the Forge image and bim packages respectively.

Octave - error: 'fwt' undefined after installing the required package

I have installed the ltfat package as referenced, here, as I want to use the fwt function.
I downloaded the package from, here, and then ran the following command in the Octave command-line window:
pkg install -forge ltfat
I'm however having the following error:
error: 'fwt' undefined
How can I solve this issue?
Thanks.
You need to load the package before using its functions. i.e.
pkg load ltfat
This is mentioned in the documentation of both Octave and ltfat package.

"Couldn't resolve hostname" while installing package in Octave

I have tried installing a package in Octave using this command:
pkg install signal-1.4.0.taz.gz
but I received the following error:
error: pkg: failed to read package 'signal-1.4.0.taz.gz': Couldn't resolve host name
error: called from
pkg at line 429 column 17
Does somebody know what that means?
You have mis-spelled the name of the package's tarball. It is likely signal-1.4.0.tar.gz rather than signal-1.4.0.taz.gz (Note that one has TAR and the other has TAZ in the extension)
pkg install signal-1.4.0.tar.gz
Essentially what is happening, is that Octave is unable to find the file signal-1.4.0.taz.gz on the file system (due to the mis-spelling) so then it attempts to download the file from the internet. When it tries to resolve signal-1.4.0.taz.gz as a URL, DNS name resolution fails giving you the error that you're encountering.
I just had the same issue/error when trying to install the econometrics package on a windows install. In my case, for reasons unknown I was getting the following error:
>> pkg install econometrics-1.1.1.tar.gz
error: pkg: failed to read package 'econometrics-1.1.1.tar.gz': Couldn't resolve host name
error: called from
pkg at line 433 column 17
The only way I managed to get it, was by first downloading the package manually into the current working directory of Octave. (See pwd output.) Only then did the install command work.
pkg install econometrics-1.1.1.tar.gz
pkg load econometrics
I recently have this problem, you need to place the file in the Octave directory and from there rigth clik on the file to copy to clipboard and then paste from there.
example:
to me work to change the document to disc D, and then install like:
pkg install symbolic-win-py-bundle-2.9.0.tar.gz

Unable to install package optim in Octave

I try to install the package optim in Octave using the command
pkg install -auto -forge optim
But it gives an error:
error: get_forge_pkg: could not read version number from package's page
error: called from
get_forge_pkg at line 49 column 7
get_forge_download at line 26 column 12
pkg at line 393 column 29
I am not able to resolve this error.
This typically happens when, for some reason, Octave cannot access the list of latest package releases on Sourceforge.
I have just tried on Octave 4.0.3
pkg install -auto -forge optim
and it worked:
>> pkg install -auto -forge optim
For information about changes from previous versions
of the optim package, run 'news optim'.
Sourceforge has been unavaible for some time a few days ago, perhaps is it the reason for the problem that you encountered.
Can you try again and see if the problem still exists?
If you use ubuntu, you can try
sudo apt-get install octave-optim

Octave imread function

I installed latest Octave on Ubuntu 14.04 machine. However, when I tried to run imread command, it showed the following error message:
octave:12> imread('newfile.png')
error: imread: invalid image file: /usr/lib/x86_64-linux-gnu/octave/3.8.1/oct/x86_64-pc-linux-gnu/__magick_read__.oct: failed to load: /usr/lib/x86_64-linux-gnu/octave/3.8.1/oct/x86_64-pc-linux-gnu/__magick_read__.oct: undefined symbol: _ZN6Magick5ColorC1Ehhh
error: called from:
error: /usr/share/octave/3.8.1/m/image/private/__imread__.m at line 181, column 7
error: /usr/share/octave/3.8.1/m/image/private/imageIO.m at line 66, column 26
error: /usr/share/octave/3.8.1/m/image/imread.m at line 107, column 30
Can someone please suggest how to solve it?
Thanks!
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.