Run the sudo port-V selfupdate command, and a timeout occurs.
68-245-171-115: var fanshulin $ sudo port-V selfupdate
Password: ---> updating macports base sources using rsyncrsync: failed to connect to rsync.macports.org: Operation timed out (60) rsync error: Error in socket io (Code 10) at/sourcecache/rsync/rsync-42/rsync/clientserver. C (105) [handler ER = 2.6.9] command failed:/usr/bin/rsync-rtzv -- delete-after rsync: // outputs/opt/local/var/macports/sources/rsync.macports.org/release/tarballsexit code: 10 error:/opt/local/bin/port: Port selfupdate failed: Error synchronizing macports sources: command Execution failed
The solution is as follows:
1. the link to the official website is found. http://trac.macports.org/ticket/36256, And the cursor indicates that the link has been reached.
Http://trac.macports.org/wiki/howto/PortTreeTarball
2. See the following description:
Configuration
Edit $ prefix/etc/macports/sources. conf, comment out the rsync entry, and add a new entry as follows:
# Rsync: // rsync.macports.org/release/ports/ [Default] http://www.macports.org/files/ports.tar.gz [Default]
You cannot directly edit source. conf. Copy it to the desktop notepad and open it.
Add the above parameters as follows:
// Rsync: // rsync.macports.org/release/tarballs/ports.tar [Default]
# Rsync: // rsync.macports.org/release/ports/ [Default]
Http://www.macports.org/files/ports.tar.gz [Default]
3. Copy and overwrite the file.
4. sudo port-V selfupdate
5. Update normally. The 21m package is as follows:
68-245-171-115: var fanshulin $ sudo port-D sync
Password:
Warning:/opt/local/etc/macports/sources. conf specifies Invalid Source '// rsync: // rsync.macports.org/release/tarballs/ports.tar [Default]', ignored.
Debug: copying/users/fanshulin/library/preferences/COM. Apple. dt. xcode. plist to/opt/local/var/macports/home/library/preferences
---> Updating the ports tree
Synchronizing local ports tree from http://www.macports.org/files/ports.tar.gz
% Total % received % xferd average speed time Time Current
Dload upload total spent left speed
100 21.5 m 100 21.5 m 0 0 32451 0 0:11:36 --: -- 81848
Problem solving: xxoo, there is still a long way to go. I was installing opencv.