東山n条より

京都在住情報系学生のメモ。

Proxy 越しで Macport を使う

研究室の iMac で Macport がこんなメッセージが出て、 selfupdate できなくなった。

User% sudo port selfupdate
Warning: xcodebuild exists but failed to execute
--->  Updating MacPorts base sources using rsync
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: shell command failed (see log for details)

Macports の設定ファイル /opt/local/etc/macports/macports.conf の proxy の設定の部分に以下の設定すると sefupdate できるようになった。
<hostname>, <port> を適宜変更してください。

~~~ 中略 ~~~
# 
proxy_override_env    yes
# HTTP proxy:
proxy_http      <hostname>:<port>
# HTTPS proxy:
proxy_https     <hostname>:<port>
# FTP proxy:
proxy_ftp        <hostname>:<port>
# rsync proxy:
proxy_rsync     <hostname>:<port>
# hosts not to go through the proxy (comma-separated, applies to HTTP, HTTPS,
# and FTP, but not rsync):
#proxy_skip            internal1, internal2, internal3