Issues self updating Macports

Ryan Schmidt ryandesign at
Wed Mar 11 07:31:51 UTC 2020

On Mar 9, 2020, at 21:14, Angus Denton wrote:

> I have encountered two issues when attempting to update Macports it self before being able to update my ports.
> sudo self update produces an error 
> error renaming "/opt/local/var/macports/sources/": no such file or directory
> error renaming "/opt/local/var/macports/sources/" : no such file or directory
> If I then create this directory by hand as it's the 'base' directory that is missing,  it leads to the next issue which is 
> arning: No version file found, please rerun selfupdate.
> warning: No version file found, please rerun selfupdate.
> Short of uninstalling Macports and and all my associated ports, how do I get past this issue ?
> My current version of macports is 2.5.3
> I am on a MBP mid 2012 running 10.11.6 (Yes I know it's old and should be updated but I still need the Apple Pro apps)

You *should* be able to selfupdate from MacPorts 2.5.3 to the current version. I am not sure why that is not working. There may be a bug in our upgrade code that you are the first person to find; probably most other users upgraded from 2.5.3 to a newer version before now and so might not have encountered this particular problem.

You can work around the selfupdate failure by downloading and running the current MacPorts 2.6.2 installer for OS X 10.11 from our web site:

This will update MacPorts base to 2.6.2 and will then run selfupdate to update your ports definitions. Your installed ports will stay installed.

As usual, you can then run "port outdated" to see the set of outdated ports and "sudo port upgrade outdated" to upgrade them. However since it has been well over a year since you last updated you may run into some problems. We usually keep port upgrade paths around for one year (expecting that most users will upgrade their ports at least once a year), so some upgrade paths for some of your installed ports may no longer be present. You may need to manually uninstall some obsolete ports and manually locate and install their replacements (assuming you still want them). "sudo port reclaim" can help you remove ports and files you no longer need. Or you could use "port installed obsolete" and "port installed leaves" to locate ports that you might no longer need and could uninstall, both to save space and to reduce the number of ports that you would otherwise be upgrading.

Unfortunately the server our OS X 10.11 build machine is hosted on suffered a disk failure last month and I have not been able to bring it back online on a new disk yet. That means you will encounter more ports than usual for which binaries are not available and which your computer will therefore have to build from source, which will take much more time. If you'd rather wait until we have that fixed, you can add yourself to the Cc list for this ticket: to be notified of any updates.

More information about the macports-users mailing list