MacPorts_macbook软件安装

MacPorts_macbook软件安装起先是为了在mac上装gcc4.7,搜了半圈发现macports最方便。于是按照官方的介绍撸开了袖子干。参见:https://guide.macports.org/chunked/installing.html1.首先卸载了旧版本的macportsudoport-fpuninstallinstalled以及其他sudorm-rf\…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

起先是为了在mac上装gcc4.7,搜了半圈发现macports最方便。于是按照官方的介绍撸开了袖子干。

参见:https://guide.macports.org/chunked/installing.html

1.首先卸载了旧版本的macport

   sudo port -fp uninstall installed

 以及其他

    sudo rm -rf \        /opt/local \

        /Applications/DarwinPorts \
        /Applications/MacPorts \
        /Library/LaunchDaemons/org.macports.* \
        /Library/Receipts/DarwinPorts*.pkg \
        /Library/Receipts/MacPorts*.pkg \
        /Library/StartupItems/DarwinPortsStartup \
        /Library/Tcl/darwinports1.0 \
        /Library/Tcl/macports1.0 \
        ~/.macports

2. 然后开始安装,我选得是svn安装

$ mkdir -p /opt/mports
$ cd /opt/mports
$ svn checkout https://svn.macports.org/repository/macports/trunk


$ cd /opt/mports/trunk/base
$ ./configure --enable-readline
$ make
$ sudo make install
$ make distclean

 

3. udpate, 这一步遇到一些困难,花了好些时间才解决

  由于直接update总是失败,将update改为本地 ,即修改 /opt/local/etc/macports/sources.conf,把最后 rsync 那行注掉,改成本地路径

#rsync://rsync.macports.org/release/tarballs/ports.tar [default]
file:///opt/mports/trunk/dports [default]

   当执行完update命令:

 sudo port selfupdate

   有如下错误:

--->  Updating the ports tree
Synchronizing local ports tree from file:///opt/mports/trunk/dports
Updating '.':
svn: E175002: Unable to connect to a repository at URL 'https://svn.macports.org/repository/macports/trunk'
svn: E175002: OPTIONS of 'https://svn.macports.org/repository/macports/trunk': Server certificate verification failed: issuer is not trusted (https://svn.macports.org)
Command failed: /usr/bin/svn update --non-interactive /opt/mports/trunk/dports
Exit code: 1
Syncing local Subversion ports tree failed
Error: Couldn't sync the ports tree: Synchronization of 1 source failed
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: /opt/local/bin/port: port selfupdate failed: Couldn't sync the ports tree: Synchronization of 1 source failed

 

用了 port -d selfupdate debug 跟踪,发现是svn权限的问题。当update的时候,会invoke command “/usr/bin/svn update –non-interactive /opt/mports/trunk/dports”  黄色flag 表示执行update的时候和系统无及时交互,所以没机会存证书.

stackoverflows上一些老外也讨论过这个问题,参见

http://stackoverflow.com/questions/3147660/server-certificate-verification-failed-issuer-is-not-trusted

最后解决

First, tell subversion to use your proxy to connect to the server:

If $prefix/var/macports/home/.subversion/servers doesn't exist, create it by copying the corresponding file from another user. (SVN automatically creates this file if it doesn't exist.)
Edit the file and set a proxy for hosts at *.macports.org. Different proxy configurations require different sets of options here, but the file is pretty well commented, so it should be easy to figure out what you need. At a minimum you'll need settings for http-proxy-host and http-proxy-port.
Finally, if you want to use SVN over HTTPS to access the repository, you'll need to tell SVN to trust the MacPorts signature. (SVN doesn't trust the authority that issued it, and port sync below invokes svn up with the --non-interactive flag, so you won't have the opportunity to accept the certificate then.)

mkdir -p $prefix/var/macports/home/.subversion/auth/svn.ssl.server
As a normal user, run svn ls https://svn.macports.org/repository/macports/trunk/dports/. When prompted, accept the certificate permanently.
SVN will store the certificate in a file in the directory $HOME/.subversion/auth/svn.ssl.server. In that directory, find the file that contains the string "https://svn.macports.org" and copy it into $prefix/var/macports/home/.subversion/auth/svn.ssl.server.

一句话总结就是 将 $HOME/.subversion/auth/svn.ssl.server. 目录下含字段”https://svn.macports.org”的文件拷贝到 

/opt/local/var/macports/home/.subversion/auth/svn.ssl.server/

 

然后执行  port selfupdate

成功,over

转载于:https://www.cnblogs.com/jerryshu/p/4204920.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/192788.html原文链接:https://javaforall.net

(2)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • mysql创建数据库的步骤_sql创建数据库代码

    mysql创建数据库的步骤_sql创建数据库代码作者介绍:陈东明,饿了么北京技术中心架构组负责人,负责饿了么的产品线架构设计以及饿了么基础架构研发工作。曾任百度架构师,负责百度即时通讯产品的架构设计。具有丰富的大规模系统构建和基础架构的研发经验,善于复杂业务需求下的大并发、分布式系统设计和持续优化。个人微信公众号dongming_cdm。Tedis(https://github.com/eleme/tedis)是基于开源TiKV…

    2025年12月7日
    7
  • sql语言总结合集

    sql语言总结合集

    2021年10月2日
    44
  • mysql慢查询_mysql慢查询为什么要用

    mysql慢查询_mysql慢查询为什么要用1概念MySQL的慢查询,全名是慢查询日志,是MySQL提供的一种日志记录,用来记录在MySQL中响应时间超过阀值的语句。具体环境中,运行时间超过long_query_time值的SQL语句,则会被记录到慢查询日志中。long_query_time的默认值为10,意思是记录运行10秒以上的语句。默认情况下,MySQL数据库并不启动慢查询日志,需要手动来设置这个参数。当然,如果…

    2022年10月15日
    4
  • c++ 字符串流 sstream(常用于格式转换)

    c++ 字符串流 sstream(常用于格式转换)点我进入原文c++字符串流sstream(常用于格式转换)  使用stringstream对象简化类型转换C++标准库中的提供了比ANSIC的更高级的一些功能,即单纯性、类型安全和可扩展性。在本文中,我将展示怎样使用这些库来实现安全和自动的类型转换。为什么要学习如果你已习惯了风格的转换,也许你首先会问:为什么要花

    2022年6月4日
    93
  • Kali Linux 系统安装详细教程(VMware14)「建议收藏」

    Kali Linux 系统安装详细教程(VMware14)「建议收藏」文章出自个人博客https://knightyun.github.io/2018/04/15/kali-linux-install,转载目录一、KaliLinux介绍 1、Linux2、Kali二、虚拟机安装与配置 1、下载2、安装配置三、Kali系统安装与配置一、KaliLinux介绍1、Linux引用一下百度百科: Linux是一套免费使用和自由传播的类Unix操作系统,是一个基于PO…

    2022年6月5日
    31
  • phpstorm2021 激活码【注册码】

    phpstorm2021 激活码【注册码】,https://javaforall.net/100143.html。详细ieda激活码不妨到全栈程序员必看教程网一起来了解一下吧!

    2022年3月20日
    42

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号