下载pcre: pcre-8.41
下载swig :swiglinux
$ tar -zxvf pcre-8.41.tar.gz $ chmod -R 777 pcre-8.41 $ cd pcre-8.41/ $ ./configure $ make $ sudo make install
$ ./configure $ make $ sudo make install
查看swig版本web
$ swig -version
若是出现swig:error while loading shared libraries:libpcre.so.1异常,
确认是否安装pcre,不然安装pcrevim
若是确认安装pcre,则运行svg
#ldd $(which swig)
会看到.net
libpcre.so.1 => not foundcode
手动添加连接:orm
#ln -s /usr/local/lib/libpcre.so.1 /lib
完毕后再次运行xml
#swig -version
可看到版本信息。get
SWIG Version 3.0.11
Compiled with g++ [x86_64-pc-linux-gnu]
Configured options: +pcre
Please see http://www.swig.org for reporting bugs and further informationit
$ ./configure --prefix=/usr/local/xxx/swig $ make $ sudo make install
路径添加到文件,
$ vim /etc/profile (可能须要管理员权限)
在最后添加一行:PATH=/usr/local/swig2.0.9/bin:$PATH。保存后从新加载生效:
$source /etc/profile