Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

MacPortsのアンインストール&Homebrewのインストール

More than 5 years have passed since last update.

はてなにメモってた過去記事を再掲シリーズ(ちょっと古いかもしれない)

問題

ある時から
$ sudo port selfupdate
すると

--->  Updating MacPorts base sources using rsync
MacPorts base version 2.0.3 installed,
MacPorts base version 2.1.3 downloaded.
--->  Updating the ports tree
--->  MacPorts base is outdated, installing new version 2.1.3
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl

Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: shell command failed (see log for details)

て言われるように。

まずはMacPortsのアンインストール

$ sudo port -fp uninstall --follow-dependents 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

環境変数から/opt/local系を削除

$ emacs ~/.bash_profile

次にHomebrewのインストール

$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

試しに何かインストール

$ brew install git

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away