MacPorts installation processes

Rainer Müller raimue at macports.org
Fri Nov 10 13:04:12 UTC 2017


On 2017-11-10 09:56, Patrick Hinkle wrote:
> 4.) After performing "Source install" using section 2.2.2's installation
> techniques I use 2.2.5's "MacPorts and the shell" and have entered:
> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
> followed by 'port search', & 'port edit and I get the following bash output:
> 
> Version number in metadata table is newer than expected.
> 
>     while executing
> 
> "registry::open $db_path"
> 
>     (procedure "mportinit" line 642)
> 
>     invoked from within
> 
> "mportinit ui_options global_options global_variations"
> 
> Error: /opt/local/bin/port: Failed to initialize MacPorts, Version
> number in metadata table is newer than expected.
> Here, I am performing the "Source install" using section 2.2.2's
> installation techniques & section 2.2.5's "MacPorts and the shell"
> techniques - Is this Error just a product of me installing MacPorts more
> than once or does it justify me using other techniques, like uninstalling?

This means you installed a later version of MacPorts before. If you had
a development version from the master branch installed before, your
registry database was upgraded, which makes it unusable for older
versions of MacPorts.

I guess you follow the "Git Install" in the guide. I noticed it only
showed how to install a development snapshot from the master branch, but
did not mention or discuss the consequences in any way. I updated [1]
the instructions now with a step to 'git checkout' the latest release tag.

Unfortunately, there is no way to roll back these changes to the
registry. Either you have to keep using development versions, or you
have to uninstall MacPorts completely, then reinstall the latest stable
release and all ports from scratch. I recommend the latter.

In general, the recommended way to install MacPorts is the .pkg
installer as that will also try to automatically configure the PATH
variable in your home directory.

Rainer

[1]
https://github.com/macports/macports-guide/commit/08a6fb21d3c89866e8da3213a663a1f4aef1949a


More information about the macports-users mailing list