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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 如何得到屏幕分辨率?

    如何得到屏幕分辨率?

    2021年7月29日
    53
  • pycharmlinux安装教程_深度linux系统官网

    pycharmlinux安装教程_深度linux系统官网Linux系统下PyCharm的安装1.什么是PyCharm2.什么是IDE3.PyCharm的安装4.PyCharm的使用5.pycharm的一些快捷键1.什么是PyCharmPyCharm是一种PythonIDE,带有一整套可以帮助用户在使用Python语言开发时提高其效率的工具,比如调试、语法高亮、Project管理、代码跳转、智能提示、自动完成、单元测试、版本控制。此外…

    2022年8月28日
    1
  • Rabbitmq安装_rabbitmq 配置

    Rabbitmq安装_rabbitmq 配置RabbitMQ服务器如何安装?RabbitMQ是一个AMQP(AdvancedMessageQueue,即高级消息队列协议)服务器。下载地址: RabbitMQ下载安装说明:各

    2022年8月3日
    4
  • Java实现 蓝桥杯 算法提高 三进制数位和

    Java实现 蓝桥杯 算法提高 三进制数位和算法提高三进制数位和时间限制:1.0s内存限制:256.0MB提交此题问题描述  给定L和R,你需要对于每一个6位三进制数(允许前导零),计算其每一个数位上的数字和,设其在十进制下为S。一个三进制数被判断为合法,当且仅当S为质数,或者S属于区间[L,R]。你的任务是给出合法三进制数的个数。输入格式  一行两个非负整数L,R。输出格式  一行一个非负整数表示答案。样例输…

    2022年6月16日
    26
  • bios刷写工具_蓝天P750/P751编程器刷BIOS「建议收藏」

    bios刷写工具_蓝天P750/P751编程器刷BIOS「建议收藏」神舟ZX8-SP7是蓝天P751DM2模具,今天在WIN下刷BIOS成功刷黑,开始使用编程器刷BIOS,笔记本BIOS芯片由于是焊在主板上必须用夹子或者脱焊后用烧录座刷写,所以需要买编程器夹子。工具:优硕EZP-XPROV2、优硕SOP8编程器夹子。目标:神舟ZX8-SP7(P751DM2模具)准备工作:去蓝天镜像站下载对应的模具的BIOS蓝天镜像站:https://repo.palkeo.co…

    2022年6月26日
    163
  • SpringMVC-@RequestMapping的参数和用法

    SpringMVC-@RequestMapping的参数和用法RequestMapping里面的注解包含的参数如图:RequestMapping是一个用来处理请求地址映射的注解,可用于类或方法上。用于类上,表示类中的所有响应请求的方法都是以该地址作为父路径。@RequestMapping除了修饰方法,还可来修饰类:类定义处:提供初步的请求映射信息。相对于WEB应用的根目录;方法处:提供进一步的细分映射信息。相对于类定义处的URL。若类定义处未

    2022年5月26日
    65

发表回复

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

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