Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#49569 closed defect (invalid)

selfupdate failed on El Capitan

Reported by: axknightroad@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.3.4
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port:

Description

I installed MacPorts using the OS X package installer today. but it failed when I update using port -v selfupdate.

$ sudo port -v selfupdate
--->  Updating MacPorts base sources using rsync
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 1
Error: Error synchronizing MacPorts sources: command execution failed
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed

but the commmand below is worked.

$ sudo /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs 

Change History (11)

comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase

Unfortunately there's not much information in that error message to go on.

Does this problem always happen?

Has it ever worked? If so, what changed since then?

comment:2 in reply to:  1 Changed 8 years ago by axknightroad@…

Replying to ryandesign@…:

Unfortunately there's not much information in that error message to go on.

Does this problem always happen?

Has it ever worked? If so, what changed since then?

It happened every time I used selfupdate since I have installed MacPorts.

comment:3 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

It is possible that your network restricts access to rsync servers.

Please try using the debug switch (-d) instead of the verbose switch (-v); that might give us more information.

comment:4 Changed 8 years ago by axknightroad@…

I have tried many times under different networks, but it never worked.

But it worked when I used the rsync command with rsync://rsync.macports.org/release/tarballs/base.tar.

So I don't think it is network problem.

And It showed these infromation when I used debug switch (-d):

$ sudo port -d selfupdate
DEBUG: Copying /Users/axel/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
--->  Updating MacPorts base sources using rsync
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 1
DEBUG: Error synchronizing MacPorts sources: command execution failed
    while executing
"macports::selfupdate [array get global_options] base_updated"
Error: Error synchronizing MacPorts sources: command execution failed
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed
Last edited 8 years ago by axknightroad@… (previous) (diff)

comment:5 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Does the directory /opt/local/var/macports/sources/rsync.macports.org/release/tarballs exist and have the correct permissions and ownership?

comment:6 in reply to:  5 Changed 8 years ago by axknightroad@…

Replying to ryandesign@…:

Does the directory /opt/local/var/macports/sources/rsync.macports.org/release/tarballs exist and have the correct permissions and ownership?

Yes, this directorie exists, its permissions are 755 and owner is root.

I tried changing it to 777, but the selfupdate command failed still.

Last edited 8 years ago by axknightroad@… (previous) (diff)

comment:7 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

What about all the directories leading up to it?

comment:8 Changed 8 years ago by bernard.jphilippe@…

I have the same problem on my personal computer (running on El Capitan, with WiFi connexion). But I don't have this problem on my professional computer (running on Yosemite, with Ethernet connexion).

I tested it at the same location. WiFi and Ethernet connexion are two distinct network. I tried with the WiFi network on my professional computer, and I have also this error. So the problem comes from the network. We can see it here:

[jpbernard:~] 1 $ sudo /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Password:
rsync: failed to connect to rsync.macports.org: Operation timed out (60)
rsync error: error in socket IO (code 10) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/clientserver.c(105) [receiver=2.6.9]
Version 1, edited 8 years ago by bernard.jphilippe@… (previous) (next) (diff)

comment:9 in reply to:  description ; Changed 8 years ago by alfreditomora@…

Replying to axknightroad@…:

I had the same error over a wifi connection, but when I moved to a wired connection it worked. Additionally I had to change the permissions (chmod 777) to this file (/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/). Finally I used sudo to run the command:

sudo port -v selfupdate

comment:11 in reply to:  9 ; Changed 7 years ago by uncat (锦喵)

Replying to alfreditomora@…:

Replying to axknightroad@…:

I had the same error over a wifi connection, but when I moved to a wired connection it worked. Additionally I had to change the permissions (chmod 777) to this file (/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/). Finally I used sudo to run the command:

sudo port -v selfupdate

you are right ,but not 777 ,because it is a directory,so you should change the permissions (chmod 664) to that file

comment:12 in reply to:  11 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

Replying to uncat:

Replying to alfreditomora@…:

Replying to axknightroad@…:

I had the same error over a wifi connection, but when I moved to a wired connection it worked. Additionally I had to change the permissions (chmod 777) to this file (/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/). Finally I used sudo to run the command:

sudo port -v selfupdate

you are right ,but not 777 ,because it is a directory,so you should change the permissions (chmod 664) to that file

Directories need execute permission; 664 does not include execute permission.

I'm going to close this ticket since the problem was determined to be due to wrong permissions on the user's system and problems specific to the user's network.

Note: See TracTickets for help on using tickets.