Hi Dave and Joris,
Thanks for the pointers, I finally managed to install for both Ubuntu and Debian. This is what I did:
Ubuntu:
apt-get install -y software-properties-common
add-apt-repository -y ppa:octave/stable
apt-get update
apt-get install -y octave=4.2.1-2~octave~xenial1
apt-get install -y liboctave-dev
octave --no-window-system --eval "pkg install -forge struct"
octave --no-window-system --eval "pkg install -forge optim"
Debian:
echo "deb
http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
apt-get update
apt-get install -y octave-common=4.2.1-2~bpo9+1
apt-get install -y octave=4.2.1-2~bpo9+1
apt-get install -y liboctave-dev=4.2.1-2~bpo9+1
octave --no-window-system --eval "pkg install -forge struct"
octave --no-window-system --eval "pkg install -forge optim"
Those are compatible with the latest builds of casadi available in sourceforge
Cheers,
Andres