Error while trying to uninstall Macports

I am using this link to uninstall macports and install homebrew instead. However, I ran into an error in the first step. I launch sudo port -f uninstall installed

my terminal (I'm on a mac btw) and it spits this right at me:

Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: configured user/group macports does not exist, will build as root
---> Uninstalling python27 @2.7.1_3
Error: Target org.macports.uninstall returned: error deleting "/opt/local/var/macports/software/python27/2.7.1_3": directory not empty
Log for python27 is at: /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_python27_2.7.1_3/python27/main.log
Warning: Failed to execute portfile from registry for python27 @2.7.1_3 
--->  Uninstalling python27 @2.7.1_3
Error: port uninstall failed: error deleting "/opt/local/var/macports/software/python27/2.7.1_3": directory not empty

      

I'm not really sure what this means and I'm not very familiar with macports. I don't even think I have installed python with macports ...

+3


source to share


1 answer


If you are going to uninstall macports I would just do the uninstall

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

      



The first warnings you get are because you don't have the latest macports, so run selfupdate. For the error, you need to look at the log suggested/opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_python27_2.7.1_3/python27/main.log

The reason macports installed python without your asking is probably because you asked for the port that python was supposed to use. Macports will install its own python so it knows exactly what versions and compilation options were used for python, as developers from a lot of experience with Unix vendors have found that vendors (like Apple) can make a difference and cause problems (see Recent Updates for Xcode for a good example) or not provide the later bug fixes that are needed. Homebrew trusts Apple to use Apple versions

+3


source







All Articles