1、首先安装Command Line Tool
xcode-select --install
2、Mac OSX平台下,用神器Homebrew安装
curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1
3、升级Homebrew
sudo brew update && sudo brew upgrade
4、安装gcc、XQuartz
sudo brew install gcc
sudo brew install Caskroom/cask/xquartz
5、通过Homebrew安装Octave
sudo brew install octave
安装成功,输入octave即可
若安装出现故障,尝试
brew install homebrew/science/octave