You have a locally installed octave in /usr/local/bin. You should delete this (broken) copy of Octave before installing or upgrading any octave packages from the Ubuntu repositories. Ubuntu's octave package is not in error here, it is the copy of Octave that you had previously built from source and installed globally on your system.
Feel free to confirm by responding here if removing everything octave under /usr/local fixes this problem, but I am fairly certain it will. ** Changed in: octave (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1654425 Title: package octave 4.0.0-3ubuntu9.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 127 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/octave/+bug/1654425/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs