下载pcre: pcre-8.41 下载swig :swig
1 安装 pcre
2 安装swig到默认目录
查看swig版本
如果出现swig:error while loading shared libraries:libpcre.so.1异常,
确认是否安装pcre,否则安装pcre
如果确认安装pcre,则运行
会看到
libpcre.so.1 => not found
手动添加链接:
完毕后再次运行
可看到版本信息。
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 information
3 安装swig到用户指定目录
路径添加到文件,
在最后添加一行:PATH=/usr/local/swig2.0.9/bin:$PATH。保存后重新加载生效: