日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

macOS - 安装 swig 、PCRE

發布時間:2023/12/20 编程问答 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 macOS - 安装 swig 、PCRE 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

文章目錄

    • 安裝 swig
    • 單獨安裝 PCRE


安裝 swig

1、下載
http://www.swig.org/download.html


2、配置安裝包地址

./configure --prefix=~/opt/swig

3、下載 pcre
下載地址: https://github.com/PhilipHazel/pcre2/releases


把 pcre 安裝包,拖拽到 swig-4.0.2 目錄下
可以先不單獨安裝 pcre,swig 中的腳本會安裝。如果要單獨安裝可以看下方。


4、修改 swig 中安裝 pcre 的腳本:
查看 /Tools/pcre-build.sh 文件,第四十行:

pcre_tarball=`ls pcre-*.tar*`

你可以根據下載的 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的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。