1、官网下载swig-3.0.12.tar.gz;
2、解压到指定目录;
3、进入解压后的目录,依次运行指令:
bash ./configure --prefix=/usr/local/swig-3.0.12 --without-pcre【即不需要安装pcre依赖】
make && make install
4、蓝后,配置环境变量:
export PATH=$ANT_HOME/bin:$PATH
export PATH=/usr/local/swig-3.0.12/bin:$PATH
5、保存,使环境变量生效;
6、运行swig -version查看版本信息:
SWIG Version 3.0.12
Compiled with g++ [x86_64-pc-linux-gnu]
Configured options: -pcre
Please see http://www.swig.org for reporting bugs and further information
7、完美。