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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

MacPorts_macbook软件安装

發布時間:2023/12/24 综合教程 26 生活家
生活随笔 收集整理的這篇文章主要介紹了 MacPorts_macbook软件安装 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

起先是為了在mac上裝gcc4.7,搜了半圈發現macports最方便。于是按照官方的介紹擼開了袖子干。

參見:https://guide.macports.org/chunked/installing.html

1.首先卸載了舊版本的macport

sudo port -fp uninstall installed

以及其他

    sudo rm -rf \        /opt/local \

        /Applications/DarwinPorts \
        /Applications/MacPorts \
        /Library/LaunchDaemons/org.macports.* \
        /Library/Receipts/DarwinPorts*.pkg \
        /Library/Receipts/MacPorts*.pkg \
        /Library/StartupItems/DarwinPortsStartup \
        /Library/Tcl/darwinports1.0 \
        /Library/Tcl/macports1.0 \
        ~/.macports

2. 然后開始安裝,我選得是svn安裝

$ mkdir -p /opt/mports
$ cd /opt/mports
$ svn checkout https://svn.macports.org/repository/macports/trunk


$ cd /opt/mports/trunk/base
$ ./configure --enable-readline
$ make
$ sudo make install
$ make distclean

3. udpate, 這一步遇到一些困難,花了好些時間才解決

由于直接update總是失敗,將update改為本地 ,即修改/opt/local/etc/macports/sources.conf,把最后rsync 那行注掉,改成本地路徑

#rsync://rsync.macports.org/release/tarballs/ports.tar [default]
file:///opt/mports/trunk/dports [default]

當執行完update命令:

 sudo port selfupdate

有如下錯誤:

--->  Updating the ports tree
Synchronizing local ports tree from file:///opt/mports/trunk/dports
Updating '.':
svn: E175002: Unable to connect to a repository at URL 'https://svn.macports.org/repository/macports/trunk'
svn: E175002: OPTIONS of 'https://svn.macports.org/repository/macports/trunk': Server certificate verification failed: issuer is not trusted (https://svn.macports.org)
Command failed: /usr/bin/svn update --non-interactive /opt/mports/trunk/dports
Exit code: 1
Syncing local Subversion ports tree failed
Error: Couldn't sync the ports tree: Synchronization of 1 source failed
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: /opt/local/bin/port: port selfupdate failed: Couldn't sync the ports tree: Synchronization of 1 source failed

用了 port -d selfupdate debug 跟蹤,發現是svn權限的問題。當update的時候,會invoke command “/usr/bin/svn update –non-interactive /opt/mports/trunk/dports” 黃色flag 表示執行update的時候和系統無及時交互,所以沒機會存證書.

stackoverflows上一些老外也討論過這個問題,參見

http://stackoverflow.com/questions/3147660/server-certificate-verification-failed-issuer-is-not-trusted

最后解決

First, tell subversion to use your proxy to connect to the server:

If $prefix/var/macports/home/.subversion/servers doesn't exist, create it by copying the corresponding file from another user. (SVN automatically creates this file if it doesn't exist.)
Edit the file and set a proxy for hosts at *.macports.org. Different proxy configurations require different sets of options here, but the file is pretty well commented, so it should be easy to figure out what you need. At a minimum you'll need settings for http-proxy-host and http-proxy-port.
Finally, if you want to use SVN over HTTPS to access the repository, you'll need to tell SVN to trust the MacPorts signature. (SVN doesn't trust the authority that issued it, and port sync below invokes svn up with the --non-interactive flag, so you won't have the opportunity to accept the certificate then.)

mkdir -p $prefix/var/macports/home/.subversion/auth/svn.ssl.server
As a normal user, run svn ls https://svn.macports.org/repository/macports/trunk/dports/. When prompted, accept the certificate permanently.
SVN will store the certificate in a file in the directory $HOME/.subversion/auth/svn.ssl.server. In that directory, find the file that contains the string "https://svn.macports.org" and copy it into $prefix/var/macports/home/.subversion/auth/svn.ssl.server.

一句話總結就是 將$HOME/.subversion/auth/svn.ssl.server. 目錄下含字段”https://svn.macports.org”的文件拷貝到

/opt/local/var/macports/home/.subversion/auth/svn.ssl.server/

然后執行 port selfupdate

成功,over

轉載于:https://www.cnblogs.com/jerryshu/p/4204920.html

總結

以上是生活随笔為你收集整理的MacPorts_macbook软件安装的全部內容,希望文章能夠幫你解決所遇到的問題。

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