macOS - 安装 swig 、PCRE
文章目錄
- 安裝 swig
- 單獨安裝 PCRE
安裝 swig
1、下載
http://www.swig.org/download.html
2、配置安裝包地址
./configure --prefix=~/opt/swig3、下載 pcre
下載地址: https://github.com/PhilipHazel/pcre2/releases
把 pcre 安裝包,拖拽到 swig-4.0.2 目錄下
可以先不單獨安裝 pcre,swig 中的腳本會安裝。如果要單獨安裝可以看下方。
4、修改 swig 中安裝 pcre 的腳本:
查看 /Tools/pcre-build.sh 文件,第四十行:
你可以根據下載的 pcre 格式修改這行代碼,比如我下載的是 pcre2-10.40.tar,那么我修改為
pcre_tarball=`ls pcre2-*.tar`5、執行安裝 pcre:
./Tools/pcre-build.sh安裝成功時,會出現
The SWIG configure script can now be run, whereupon PCRE will automatically be detected and used from /Users/xx/Documents/nlp_util/swig-4.0.2/pcre/pcre-swig-install/bin/pcre-config.
pcre 將被現狀到 xx/swig-4.0.2/pcre/pcre-swig-install/bin/pcre-config
6、配置 swig、安裝
# 配置 # ./configure ./configure --prefix=/opt/swig # The SWIG test-suite and examples are configured for the following languages: # go guile lua perl5 python ruby make sudo make install進入 swig 安裝所在文件夾
如果配置 ./configure --prefix=~/opt/swig , 那么安裝文件夾位于 ~/opt/swig 下。
測試驗證
# 查看版本信息 ./swig -versionSWIG Version 4.0.2Compiled with g++ [x86_64-apple-darwin21.4.0]Configured options: +pcrePlease see http://www.swig.org for reporting bugs and further information單獨安裝 PCRE
github: https://github.com/PCRE2Project/pcre2
官網:http://www.pcre.org
1、下載
https://github.com/PhilipHazel/pcre2/releases
2、編譯安裝
cd pcre2-10.40./configure --prefix=~/opt/pcremake && make install make -k check可執行文件會被安裝到: ~/opt/pcre
2022-07-14
總結
以上是生活随笔為你收集整理的macOS - 安装 swig 、PCRE的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 惠普g6服务器支持多大内存,惠普ProL
- 下一篇: np.save 和 sio.savema