马春杰杰 Exit Reader Mode

macports国内加速

正常进行sudo port selfupdate的时候,可能会遇到一直卡住的情况。

[~]$ sudo port selfupdate
Password:
--->  Updating MacPorts base sources using rsync

这一般就是服务器的问题。所以需要更换国内服务器进行加速,还好,清华源有。

打开/opt/local/etc/macports/macports.conf,修改:

# The rsync server for fetching MacPorts base during selfupdate. This
# setting is NOT used when downloading ports trees; ports trees are
# configured using the file referenced by sources_conf. See
# https://trac.macports.org/wiki/Mirrors#MacPortsSource for a list of
# available servers.
# rsync_server        	rsync.macports.org
# rsync_server        ftp.leg.uct.ac.za
rsync_server        pek.cn.rsync.macports.org

再打开/opt/local/etc/macports/sources.conf,修改:

# For proper functionality of various resources (port groups, mirror
# sites, etc.), the primary MacPorts source must always be tagged
# "[default]", even if switched from the default "rsync://" URL.

# rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]
# rsync://ftp.leg.uct.ac.za/pub/packages/macports/release/ports/ [default]
rsync://pek.cn.rsync.macports.org/macports/release/tarballs/ports.tar

这时再更新:

[~]$ sudo port -v sync
Warning: No default port source specified in /opt/local/etc/macports/sources.conf, using last source as default
--->  Updating the ports tree
Synchronizing local ports tree from rsync://pek.cn.rsync.macports.org/macports/release/tarballs/ports.tar
+==================================================+
|               Tsinghua University                |
|          -= Open Source Mirror Site =-           |
+--------------------------------------------------+
|   Welcome to Tsinghua Open Source Mirror Site.   |
|                                                  |
|   This mirror is also available on HTTP.         |
|   HTTP  [https://mirrors.tuna.tsinghua.edu.cn]   |
|   RSYNC [rsync://mirrors.tuna.tsinghua.edu.cn]   |
|                                                  |
|   If you have any issues, please contact us      |
|   via GitHub @ https://github.com/tuna/issues    |
|   or IRC at #tuna on freenode                    |
|   or Fishroom at https://fishroom.tuna.moe/      |
|                                                  |
|   Supported by                                   |
|      Tsinghua Information Technology Center      |
|   Maintained by                                  |
|      Tsinghua University TUNA Association        |
|   Service Provided by                            |
|      nanomirrors                                 |
|   This storage server is sponsored by            |
|      Megvii Technology Ltd.                      |
|                                                  |
|   TUNA acknowledges the contribution from        |
|   Megvii and Huawei to open source software and  |
|   communities                                    |
|                                                  |
+==================================================+

receiving file list ... done
./
ports.tar
ports.tar.rmd160

sent 112 bytes  received 101073238 bytes  949045.54 bytes/sec
total size is 101030912  speedup is 1.00
+==================================================+
|               Tsinghua University                |
|          -= Open Source Mirror Site =-           |
+--------------------------------------------------+
|   Welcome to Tsinghua Open Source Mirror Site.   |
|                                                  |
|   This mirror is also available on HTTP.         |
|   HTTP  [https://mirrors.tuna.tsinghua.edu.cn]   |
|   RSYNC [rsync://mirrors.tuna.tsinghua.edu.cn]   |
|                                                  |
|   If you have any issues, please contact us      |
|   via GitHub @ https://github.com/tuna/issues    |
|   or IRC at #tuna on freenode                    |
|   or Fishroom at https://fishroom.tuna.moe/      |
|                                                  |
|   Supported by                                   |
|      Tsinghua Information Technology Center      |
|   Maintained by                                  |
|      Tsinghua University TUNA Association        |
|   Service Provided by                            |
|      nanomirrors                                 |
|   This storage server is sponsored by            |
|      Megvii Technology Ltd.                      |
|                                                  |
|   TUNA acknowledges the contribution from        |
|   Megvii and Huawei to open source software and  |
|   communities                                    |
|                                                  |
+==================================================+

receiving file list ... done
PortIndex

sent 38 bytes  received 2364061 bytes  1576066.00 bytes/sec
total size is 18405923  speedup is 7.79
+==================================================+
|               Tsinghua University                |
|          -= Open Source Mirror Site =-           |
+--------------------------------------------------+
|   Welcome to Tsinghua Open Source Mirror Site.   |
|                                                  |
|   This mirror is also available on HTTP.         |
|   HTTP  [https://mirrors.tuna.tsinghua.edu.cn]   |
|   RSYNC [rsync://mirrors.tuna.tsinghua.edu.cn]   |
|                                                  |
|   If you have any issues, please contact us      |
|   via GitHub @ https://github.com/tuna/issues    |
|   or IRC at #tuna on freenode                    |
|   or Fishroom at https://fishroom.tuna.moe/      |
|                                                  |
|   Supported by                                   |
|      Tsinghua Information Technology Center      |
|   Maintained by                                  |
|      Tsinghua University TUNA Association        |
|   Service Provided by                            |
|      nanomirrors                                 |
|   This storage server is sponsored by            |
|      Megvii Technology Ltd.                      |
|                                                  |
|   TUNA acknowledges the contribution from        |
|   Megvii and Huawei to open source software and  |
|   communities                                    |
|                                                  |
+==================================================+

receiving file list ... done
PortIndex.rmd160

sent 38 bytes  received 626 bytes  442.67 bytes/sec
total size is 512  speedup is 0.77

 

本文最后更新于2022年12月6日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!