Error,when installing a new package in Octave - 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.

Related

running octave with netcdf package

I am trying to run octave in order to process netcdf files. While I am able to currently run octave successfully I have been having a very difficult time loading the package netcdf for octave.
I have used the command:
pkg -forge install netcdf
However when I type in:
pkg load netcdf
test netcdf
I get the following error message:
????? netcdf source code with tests for dynamically linked function not found
When I do a pkg list I get the following:
Package Name | Version | Installation directory
--------------+---------+-----------------------
netcdf *| 1.0.12 | /home/jsnyder/octave/netcdf-1.0.12
octcdf | 1.1.10 | /home/jsnyder/octave/octcdf-1.1.10
How do I resolve this issue?
Does anyone have specific instructions on how to successfully install netcdf so that it will work on octave? That includes where to get the netcdf files necessary for octave, how to successfully compile them, and then finally be able to successfully load into octave so that I can use this to process netcdf files.
These instructions have worked for me in the past:
sudo apt install netcdf-bin
sudo apt install liboctave-dev
sudo apt install libnetcdf-dev
in octave pkg install -forge netcdf
Then before using pkg load netcdf
Adding to Clinton's reply, I will recount the steps I took to installing it here, in the hope that it sheds some more light in the process of both installing and figuring out what to install in general in these situations.
I typed
pkg install netcdf -forge
in octave. Initially it complained with checking for nc-config... no
To find out which package provides this command, I ran in the linux terminal:
apt-file search nc-config
(note that if you don't have the apt-file tool you might need to install it first).
The output of the apt-file command informed me that this file is provided by the package libnetcdf-dev. So I installed this.
Retrying pkg install netcdf -forge worked the second time, and I can load the package successfully.
I also note that the second command you're trying to run is probably test_netcdf, NOT test netcdf. The former is a command included in the netcdf package, the latter is attempting to perform unit tests using the octave built-in testing syntax.
Doing test_netcdf seems to work fine for me after the above steps.

installing the mysqlclient library in mac OS

I'm trying to demo rust database program using diesel.rs library.
I'm following the getting started steps here.
As mentioned in this page, I got below error while running the command cargo install diesel_cli.
note: ld: library not found for -lmysqlclient
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The solution is given in the next step as well in same page as below.
You can resolve this issue by either installing the library (using the usual way to do this depending on your operating system) or by specifying the backends you want to install the CLI tool with.
But I don't know how to do this in my mac OS. I tried the below commands.
brew install mysqlclient
brew install lmysqlclient
But brew couldn't find any such repo.
Please help me how to resolve this error and install mysqlclient library in my mac OS.
mysql-connector-c seems to be the homebrew package you are looking for. Libmysqlclient should also be installed when installing the mysql brew package.

Image package on octave fails due to unsatisified dependencies

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

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.

How to install, verify and update all Octave packages at once?

Today I have installed Octave 3.8 with GUI on my Windows 7 machine. Is there a command that will install all the available Octave packages ? Then I would also like to see a list of all the installed packages, and update them at times. So is there a command that checks for updates of all the installed packages ? Thank you.
It looks as if pkg update will update all your installed packages. See the documentation on pkg for more details.
I haven't found a way to install all packages, I am doing them one at a time using pkg install -forge <package_name>, which is a bit tedious. It is also giving me errors when trying to install parallel.
Load/Unload all packages at once by executing the following command
pkg load all
pkg unload all
On Windows/Mac there is an installer on http://octave.sourceforge.net/. This installs all(?) packages but you have to load them with "pkg load".