@rabirgoです。
以下のエラーでselfupdateがErrorとなったのでメモ。
環境
- OS X Mountain Lion(10.8) クリーンインストール
- MacPorts(2.1.3) インストール
- OS X Marveriks(10.9) にアップグレード
- MacPorts(2.2.1) にアップデートできない ←いまここ
checking whether the C compiler works… no
これは結果的に必要だったのか不明。Xcodeを起動したら解消。(何かアップデートしてた)
[bash]
$ sudo port -v selfupdate
:
checking for gcc… /usr/bin/cc
checking whether the C compiler works… no
configure: error: in `/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base’:
configure: error: C compiler cannot create executables
See `config.log’ for more details
Command failed: cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc ./configure –prefix=/opt/local –with-tclpackage=/Library/Tcl –with-install-user=root –with-install-group=admin –with-directory-mode=0755 –enable-readline && make && make install SELFUPDATING=1
Exit code: 77
DEBUG: Error installing new MacPorts base: command execution failed
while executing
"macports::selfupdate [array get global_options] base_updated"
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed
[/bash]
error: Can’t find Tcl configuration definitions
[bash]
$ sudo port -v selfupdate
:
MacPorts base version 2.1.3 installed,
MacPorts base version 2.2.1 downloaded.
:
checking for Tcl configuration… configure: error: Can’t find Tcl configuration definitions
Command failed: cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc ./configure –prefix=/opt/local –with-tclpackage=/Library/Tcl –with-install-user=root –with-install-group=admin –with-directory-mode=0755 –enable-readline && make && make install SELFUPDATING=1
Exit code: 1
DEBUG: Error installing new MacPorts base: command execution failed
while executing
"macports::selfupdate [array get global_options] base_updated"
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed
[/bash]
こちらの記事で解決。MacPorts自体をパッケージで導入。
文中の[https://distfiles.macports.org/MacPorts/MacPorts-2.2.1-10.9-Mavericks.pkg]をアドレスバーに入れればダウンロードが開始されます。
備忘録として手順。
www.macports.orgにアクセス
releaseをクリック→OSに応じてダウンロード



2.2.1に更新されたことを確認。
というか、何をしようとしたかと言えばnkfのインストール。そのまま実行。
[bash]
$ sudo port -d selfupdate
$ sudo port -d sync
$ sudo port search nkf
$ sudo port install nkf
—> Fetching archive for nkf
—> Attempting to fetch nkf-2.1.3_2.darwin_13.x86_64.tbz2 from http://packages.macports.org/nkf
—> Attempting to fetch nkf-2.1.3_2.darwin_13.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/nkf
—> Attempting to fetch nkf-2.1.3_2.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/nkf
—> Fetching distfiles for nkf
—> Attempting to fetch nkf.git-ecf2a983ff0945462d731afa9b4d7327cfeb9b5a.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf.git-4e632c30b502e56032a1781e4edf44ec462fe6ad.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf.git-832e032be763ec6acf1cf13225b0d72f1b867a18.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf.git-6bbe38e718c98825229bce7ef9f8d236e63c095f.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf.git-fcc185d621977d87cc50c1561be0aff3924af2ac.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf.git-50a383c848f1c8c4e107ed68c3e839ff95f275a6.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf.git-d844277c5702758dcd8ef9603a2db5fd4996885c.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf.git-cdb2fdaa5e74f844a06461ec9c151af186382a40.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf.git-b0a6577a521d1bba5e19853f95d5c4b9be1072b5.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf.git-e8581233c53fc45f39de6cba6fe8c5afbaa267da.patch from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Attempting to fetch nkf-2.1.2.tar.gz from http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/nkf/
—> Verifying checksums for nkf
—> Extracting nkf
—> Applying patches to nkf
—> Configuring nkf
—> Building nkf
—> Staging nkf into destroot
—> Installing nkf @2.1.3_2
—> Activating nkf @2.1.3_2
—> Cleaning nkf
—> Updating database of binaries: 100.0%
—> Scanning binaries for linking errors: 100.0%
—> No broken files found.
[/bash]
インストールできました。普段使わないからトラブルの解決が大変。。
いじょ。