环境: mint 19 或者 > ubuntu 18
源代码安装的好处, 可以使用最新版。 mint 19.1 下面, 利用apt 直接安装的maxima版本太老,不支持 draw 函数。
load(draw) $
draw2d(
title="Two simple plots",
xlabel="x",ylabel="y",grid=true,
color=red,key="A sinus",
explicit(sin(x),x,1,10),
color=blue,line_type=dots,key="A cosinus",
explicit(cos(x),x,1,10)
)$
安装maxima
- 安装依赖
sudo apt install gnuplot-x11 fonts-jsmath
- 从源代码安装
git clone https://git.code.sf.net/p/maxima/code maxima-code --depth=1
cd maxima-code
sudo apt install gcl # 顺便安装了xemacs21
sudo apt install sbcl # Mac版
sudo apt install automake
sudo apt install texinfo # 缺失命令 makeinfo
sh bootstrap
./configure --prefix=/opt/maxima --enable-gcl-exec PYTHON=/opt/anaconda3/bin/python
make -j 8
make -j 8 check
sudo make install
/opt/maxima/bin/maxima
- 安装文档
sudo apt-get install calibre
make -C doc/info maxima.epub
安装 wxmaxima
wxWidgets
- 准备
#git clone --depth 1 --branch v3.1.2 https://github.com/wxWidgets/wxWidgets.git
git clone --depth 1 --branch v3.0.3 https://github.com/wxWidgets/wxWidgets.git
sudo apt install libgtk2.0-dev
sudo apt install libgtk-3-dev
sudo apt install libjpeg-dev libtiff-dev libpng-dev
sudo apt install libsecret-1-dev libnotify-dev
- 安装
cd wxWidgets/
./configure --prefix=/opt/maxima --with-gtk=3 --enable-monolithic
make -j 20
sudo make install
wxmaxima
- 准备
git clone --depth=1 --branch Version-19.05.7 https://github.com/wxMaxima-developers/wxmaxima.git
sudo apt install libgraphviz-dev
sudo apt install -y xvfb
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/maxima/lib
sudo ldconfig
cd /home/xyq/Desktop/wxmaxima
cd build/
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/maxima/ ..
cmake --build .
sudo cmake --build . -- install
配置一下
# 在 ~/.bashrc 中加入
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/maxima/lib
export PATH="/opt/maxima/bin:$PATH"