MAC macport上安装软件的流水账1 [特殊字符]

流水账,自从用了mac 安装软件成了难题,不是homebrew就是> > macport 关键是这俩的源都要修正成国内源,国内源又不是什么包> 都有,每次换来换去 着实不好用。

喏!又来个wget安装前的问题port更新出错。

mac 上通过docker compose up -d,安装milvus。 先下载wget 、更新macport 报错:错误日志:

复制代码
(base) ➜  milvus-standalone sudo port -v selfupdat
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
--->  Checking for newer releases of MacPorts
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    63  100    63    0     0    273      0 --:--:-- --:--:-- --:--:--   273
MacPorts base version 2.12.5 installed,
MacPorts base version 2.12.5 available.
--->  MacPorts base is already the latest version
--->  Updating the ports tree
Synchronizing local ports tree from rsync://mirrors.tuna.tsinghua.edu.cn/macports/release/ports/
+==================================================+
|               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                            |
|      bravo                                       |
|   This storage server is sponsored by            |
|      Huawei Inc.                                 |
|                                                  |
|   TUNA acknowledges the contribution from Huawei |
|   to open source software and communities        |
|                                                  |
+==================================================+

receiving file list ... rsync: [sender] change_dir "/release/ports" (in macports) failed: No such file or directory (2)
done

sent 21 bytes  received 9 bytes  60.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/20d6c351-ee94-11ec-bcaf-7247572f23b4/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(1404) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzvl --delete-after  '--exclude=/PortIndex*' rsync://mirrors.tuna.tsinghua.edu.cn/macports/release/ports/ /opt/local/var/macports/sources/mirrors.tuna.tsinghua.edu.cn/macports/release
Exit code: 23
Error: Synchronization of the local ports tree failed doing rsync
Error: Couldn't sync the ports tree: Synchronization of 1 source failed
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: /opt/local/bin/port: port selfupdate failed: Couldn't sync the ports tree: Synchronization of 1 source failed
(base) ➜  milvus-standalone 

解析:

复制代码
根据你提供的报错信息,问题出在 MacPorts 的清华源同步配置上。

问题原因

你的 MacPorts 配置尝试从 rsync://mirrors.tuna.tsinghua.edu.cn/macports/release/ports/ 同步 ports tree,但该路径在服务器上不存在,导致 rsync 报错 change_dir ... failed: No such file or directory (2)。

解决方案

你需要将 MacPorts 的源配置文件 sources.conf 中的 rsync 地址修改为正确的路径。

打开配置文件
    在终端中执行以下命令,使用文本编辑器打开 sources.conf 文件:
        sudo nano /opt/local/etc/macports/sources.conf
    

修改 rsync 地址
    在文件中找到以 rsync:// 开头的行,它可能看起来像这样:
        rsync://mirrors.tuna.tsinghua.edu.cn/macports/release/ports/ [default]
    
    请将其修改为以下正确的地址:
        rsync://mirrors.tuna.tsinghua.edu.cn/macports/macports-ports/ [default]
    
    注意: 主要是将路径中的 release/ports/ 修改为 macports-ports/。

保存并退出
    如果你使用的是 nano 编辑器,按 Control + O 保存,然后按 Enter 确认。
    接着按 Control + X 退出编辑器。

再次尝试更新
    修改完成后,再次运行更新命令:
        sudo port -v selfupdate
    
    这次应该可以成功同步 ports tree 了。

当前文件过长, 我已阅读部分内容