Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

port selfupdate: "macPorts sources: command execution failed"

Tags:

macports

I am trying to selfupdate my Macports, but I am getting the following message:

Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing 
MacPorts sources: command execution failed

I checked my /opt/local/bin/macports and the directory does not exist. Instead, it is in /opt/local/var. Could that be the issue?

Running with -dt, I get the following:

[Users/user] > selfupdate
DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/base
--->  Updating MacPorts base sources using rsync
rsync: failed to connect to rsync.macports.org: Connection refused (61)
rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-42/rsync/clientserver.c(105) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/base/ /opt/local/var/macports/sources/rsync.macports.org/release/base
Exit code: 10
DEBUG: Error synchronizing MacPorts sources: command execution failed
    while executing
"macports::selfupdate [array get global_options] base_updated"
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed

What is error 61? Any ideas how I can fix that?

like image 927
darksky Avatar asked Jul 12 '12 07:07

darksky


4 Answers

I had this same problem recently, and I forgot to run the command under root. If anyone else is having the problem, be sure to run command as so:

sudo port selfupdate
like image 52
Eric K. Avatar answered Nov 06 '22 21:11

Eric K.


I was behind a firewall. Tried on a different network and it worked.

like image 25
darksky Avatar answered Nov 06 '22 23:11

darksky


There is no /opt/local/bin/macports. The executable you need is /opt/local/bin/port. (Port files are in /opt/local/var/..., which is correct.)

Based on the command execution failed:

  • you might have forgotten to run as root.
  • port forks the following programs: rsync, tclsh, openssl, tar, chmod, chown. Are these executable and in the PATH? (Is /opt/local/bin in your PATH as well?)

If that doesn't help, run port with -dt to get all sorts of debug info. That might help with finding the problem. Append the interesting parts to your question, maybe.

like image 21
nobody Avatar answered Nov 06 '22 22:11

nobody


I faced the same issue.But I used to this method in the after.

Go to: $prefix/etc/macports/sources.conf (my path is like this):

/opt/local/etc/macports/sources.conf 

comment out the rsync entry, and add a new entry as follows:

#rsync://rsync.macports.org/release/tarballs/ports.tar [default]
https://distfiles.macports.org/ports.tar.gz [default]

After that you can run:

sudo port -d sync

It's also explained on MacPorts.com.

like image 17
beautifulcode Avatar answered Nov 06 '22 22:11

beautifulcode