• 解决安装macports,不能更新的问题


    执行命令 sudo port -v selfupdate,出现超时

    68-245-171-115:var fanshulin$ sudo port -v selfupdate

    Password:
    --->  Updating MacPorts base sources using rsync
    rsync: 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) [receiver=2.6.9]
    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: 10
    Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed

    解决方法如下:

    1.搜索到了官网的连接,http://trac.macports.org/ticket/36256,根据指引到达了

    http://trac.macports.org/wiki/howto/PortTreeTarball

    2.看到如下说明:

    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]
    

    直接编辑source.conf 是不行的,拷贝到桌面记事本打开

    添加上上去,如下:

    //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.把这个文件拷贝覆盖

    4. sudo port -v selfupdate

    5.正常更新,21M的包,如下:

    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     Time  Current

                                     Dload  Upload   Total   Spent    Left  Speed

    100 21.5M  100 21.5M    0     0  32451      0  0:11:36  0:11:36 --:--:-- 81848

    问题解决,xxoo,路还很长啊,我本是要装opencv的。 

    大部分转载 小部分自写
  • 相关阅读:
    将iso镜像转换为docker镜像
    Linux awk使用方法~~整理
    Linux sed使用方法
    Linux 环境变量梳理
    学习docker——命令总结
    Golang 字符串操作--使用strings、strconv包
    WebSocket实现一个聊天室
    学习WebSocket
    PHP面试题整理
    php使用gd库输出中文内容的图片
  • 原文地址:https://www.cnblogs.com/8586/p/2797911.html
Copyright © 2020-2023  润新知