MacPorts で Perl を upgrade できない
どうやらインストールされている Perl のバージョンが古いらしい。
$ port outdated
The following installed ports are outdated:
perl5 5.8.8_0 < 5.8.8_2
ところが upgrade すると失敗する。
$ sudo port upgrade perl5 ---> Activating perl5.8 @5.8.8_3+darwin_9 Error: Activating perl5.8 @5.8.8_3 failed: Image error: /opt/local/bin/a2p is being used by the active perl5 port. Please deactivate this port first, or use the -f flag to force the activation. ---> Activating perl5.8 @5.8.8_3+darwin_9 Error: Target org.macports.activate returned: Image error: /opt/local/bin/a2p is being used by the active perl5 port. Please deactivate this port first, or use the -f flag to force the activation. Error: The following dependencies failed to build: perl5.8 Error: Unable to upgrade port: 1
最新は 5.8.8_2 だと言っておきながら、5.8.8_3 を activate しようとしているっぽい。
調べてみると ……
$ port installed perl5 The following ports are currently installed: perl5 @5.8.8_0+darwin_9 (active) $ port installed | grep perl perl5 @5.8.8_0+darwin_9 (active) perl5.10 @5.10.0_1+shared perl5.10 @5.10.0_2+shared (active) perl5.8 @5.8.8_3+darwin_9
なんと!
perl5 と perl5.10 の他に perl5.8 とか言う port もあるのか。
$ sudo port activate perl5.8 ---> Activating perl5.8 Error: port activate failed: Image error: /opt/local/bin/a2p is being used by the active perl5 port. Please deactivate this port first, or use the -f flag to force the activation.
perl5 と perl5.8 は同時に activate できないと。
$ sudo port deactivate perl5 ---> Deactivating perl5 $ sudo port activate perl5.8 ---> Activating perl5.8
これで正解なのか?