2

I'm facing some difficulties installing packages in octave (5.2.0 via snap). I'm running ubuntu 19.10

The problem is:

>> pkg install -forge control
configure: error: in `/tmp/oct-bdXz48/control-3.2.0/src':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
checking for mkoctfile... /snap/octave/22/bin/mkoctfile-5.2.0
checking for octave-config... /snap/octave/22/bin/octave-config-5.2.0
checking whether the C++ compiler works... no

pkg: error running the configure script for control.
error: called from
    configure_make at line 82 column 9
    install at line 190 column 7
    pkg at line 441 column 9
>> which make
>> which gcc
>> which g++

I'm apt kind of guy and very new to snap so I don't know if I'm looking into right direction. The which inside octave does not have any luck with compiler related tools, but the base installation has gcc, g++, make etc...

hoo2@shirka:~$ uname -a
Linux shirka 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
hoo2@shirka:~$ apt list --installed build*
Listing... Done
build-essential/eoan,now 12.8ubuntu1 amd64 [installed]
  • You have to start with sudo apt-get install build-essential and then try again. – N0rbert Mar 14 at 14:53
  • I have. Check the last 3 lines from my post. – hoo2 Mar 14 at 16:10
1

I can confirm the issue with Snap package, but deb-packaged version works as expected.

So I would recommend to remove Snap with snap remove octave and install 4.4.1 deb instead:

sudo apt-get install octave

For Octave installed from deb we usually need to install liboctave-dev package to compile packages from Octave Forge:

sudo apt-get install liboctave-dev

Then you can install any package from Octave Forge:

pkg install -forge control

Or install the Control package as deb-package with

sudo apt install octave-control

You have to wait for a couple of months and you will get Octave 5.2 packaged in 20.04 LTS.


If you really need to have 5.2 today - use FlatPak:

sudo apt-get install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.octave.Octave
flatpak run org.octave.Octave
| improve this answer | |
  • My bad. I didn't test flatpak before posting but to be honest I have no clue of how flatpak works and I'm a little careful. I need to study it first. The reason I installed the snap was the newest version. But If the LTS will update to that then it is a sweet deal :) – hoo2 Mar 14 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.