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
Related
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.
On older versions of Fedora, one could run the following command to install the rpm-python package:
$ sudo dnf install rpm-python
But now on Fedora 32, it gives the following error:
No match for argument: rpm-python Error: Unable to find a match:
rpm-python
Which package should one install now to get that same package or a similar one on their machine?
Fedora 31 has packages python2-rpm and python3-rpm. The package rpm-python does not exist for a long time. You can request installation of rpm-python, but DNF will actually install python2-rpm.
Fedora 32 moved to Python3 completely (there are some rare exceptions) and python2-rpm ceased to exists. There is only python3-rpm which has the same code. The same API. It is just for python3 only.
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.
I am trying to compile some code in Fedora 21 using 'mpif90'.
First I install openmpi with 'yum':
[root#localhost Inversion]# yum install openmpi
Loaded plugins: langpacks
Package openmpi-1.8.3-2.fc21.x86_64 already installed and latest version
Nothing to do
But then when I compile using 'make' it doesn't work:
[root#localhost Inversion]# make all
mpif90 -O3 -c src/dispersion.f90
make: mpif90: Command not found
Makefile:18: recipe for target 'obj' failed
make: *** [obj] Error 127
As you can see I've downloaded openmpi package but it wont compile.
You cannot compile because you haven't loaded the necessary module.
You need to load the environmental module, this is how Fedora is handling openmpi when you install it using:
dnf install openmpi
(in Fedora 25)
Just follow the following steps:
In your terminal, do:
module avail
You should see an output something like this:
--------------------- /usr/share/Modules/modulefiles ----------------------
dot module-git module-info modules null use.own
---------------------------- /etc/modulefiles -----------------------------
mpi/openmpi-x86_64
Notice there is the mpi/openmpi-x86_64 module available for you to 'load'.
In your terminal, you just do:
module load mpi/openmpi-x86_64
Now you have access to all the mpi compilers like mpif90 and mpic++ etc. You can see that the compiler binaries are stored in: /usr/lib64/openmpi/bin:
$ which mpif90
and you see the output is:
/usr/lib64/openmpi/bin/mpif90
dnf whatprovides "*/mpif90"
tells you what package provides this binary. In Fedora, you can get it from openmpi-devel or mpich packages. So running
yum install openmpi-devel
should do the job for you.
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.