[MacPorts] #72681: selfupdate fails when ${prefix}/var/macports/home is missing (was: followed guide for installing MacPorts, but multiple things are failing)

MacPorts noreply at macports.org
Sat Jul 12 00:34:06 UTC 2025


#72681: selfupdate fails when ${prefix}/var/macports/home is missing
----------------------------+-----------------------------
  Reporter:  WadeMasshardt  |      Owner:  (none)
      Type:  defect         |     Status:  new
  Priority:  Normal         |  Milestone:  MacPorts 2.11.1
 Component:  base           |    Version:  2.11.0
Resolution:                 |   Keywords:
      Port:                 |
----------------------------+-----------------------------
Changes (by jmroot):

 * keywords:  guide install procedure fails to install working MacPorts =>
 * component:  ports => base
 * milestone:   => MacPorts 2.11.1


Old description:

> followed guide at https://www.macports.org/install.php to install
> MacPorts using the .pkg file for macOS 14, but contrary to what the guide
> says: "This procedure will place a fully-functional and default MacPorts
> installation on your host system, ready for usage." it does NOT place a
> functional MacPorts on my system, as the very next command I was told to
> run by the guide: "sudo port -v selfupdate" fails with the following
> error message:
>
> "% sudo port -v selfupdate
> --->  Checking for newer releases of MacPorts
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time
> Current
>                                  Dload  Upload   Total   Spent    Left
> Speed
> 100    63  100    63    0     0    774      0 --:--:-- --:--:-- --:--:--
> 777
> MacPorts base version 2.11.0 installed,
> MacPorts base version 2.11.0 available.
> --->  MacPorts base is already the latest version
> --->  Updating the ports tree
> Synchronizing local ports tree from
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar.gz
> chdir: /opt/local/var/macports/home: No such file or directory
> Command failed: /usr/bin/rsync -rtzvl --delete-after
> --include=/ports.tar.gz --include=/ports.tar.gz.rmd160
> --include=/ports.tar.gz.sig --exclude=*
> rsync://rsync.macports.org/macports/release/tarballs/
> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/remote
> Exit code: 1
> Error: Synchronization of the local ports tree failed doing rsync
> Error: Couldn't sync the ports tree: Synchronization of 1 source failed
> Error: Follow https://guide.macports.org/#project.tickets if you believe
> there is a bug.
> Error: /opt/local/bin/port: port selfupdate failed: Couldn't sync the
> ports tree: Synchronization of 1 source failed"

New description:

 followed guide at https://www.macports.org/install.php to install MacPorts
 using the .pkg file for macOS 14, but contrary to what the guide says:
 "This procedure will place a fully-functional and default MacPorts
 installation on your host system, ready for usage." it does NOT place a
 functional MacPorts on my system, as the very next command I was told to
 run by the guide: "sudo port -v selfupdate" fails with the following error
 message:

 {{{
 % sudo port -v selfupdate
 --->  Checking for newer releases of MacPorts
   % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                  Dload  Upload   Total   Spent    Left
 Speed
 100    63  100    63    0     0    774      0 --:--:-- --:--:-- --:--:--
 777
 MacPorts base version 2.11.0 installed,
 MacPorts base version 2.11.0 available.
 --->  MacPorts base is already the latest version
 --->  Updating the ports tree
 Synchronizing local ports tree from
 rsync://rsync.macports.org/macports/release/tarballs/ports.tar.gz
 chdir: /opt/local/var/macports/home: No such file or directory
 Command failed: /usr/bin/rsync -rtzvl --delete-after
 --include=/ports.tar.gz --include=/ports.tar.gz.rmd160
 --include=/ports.tar.gz.sig --exclude=*
 rsync://rsync.macports.org/macports/release/tarballs/
 /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/remote
 Exit code: 1
 Error: Synchronization of the local ports tree failed doing rsync
 Error: Couldn't sync the ports tree: Synchronization of 1 source failed
 Error: Follow https://guide.macports.org/#project.tickets if you believe
 there is a bug.
 Error: /opt/local/bin/port: port selfupdate failed: Couldn't sync the
 ports tree: Synchronization of 1 source failed"
 }}}

--

Comment:

 Creating the missing directory should work around this problem:
 {{{
 sudo mkdir -p /opt/local/var/macports/home && sudo chown macports:macports
 /opt/local/var/macports/home
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/72681#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list