zoukankan      html  css  js  c++  java
  • 解决安装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的。 

    大部分转载 小部分自写
  • 相关阅读:
    Ecshop商品批量上传,内容编码错误 您尝试查看的页面无法显示
    php 数组转化成字符串,并原样还原回数组
    PHP函数 curl_setopt
    <javascript学习笔记> javascript 获得url里参数。
    <yii 框架学习> <转> 关于yii数据库添加新字段之后model类的修改
    <yii 框架学习> 清空数据表
    <javascript学习笔记>javascript 实现隔行变色
    <javascript学习笔记> javascript 检查输入内容的长度。
    <php 代码积累 数组相关>
    <yii 框架学习> yii 框架改为中文提示
  • 原文地址:https://www.cnblogs.com/8586/p/2797911.html
Copyright © 2011-2022 走看看