习惯mac . OS X 安装MacPorts
1. 安装必要的软件
安装MacPorts需要先安装X11和Xcode,Lion系统已经默认安装好了X11,在Appstore里安装Xcode即可。
下载完Xcode之后,一般路径在/Application下,可以先将其拷出来,以备后续使用:
$ cp -a /Application/Xcode.app ~/soft
2. 安装MacPort,并安装
下载地址:https://distfiles.macports.org/MacPorts/,可以直接下载Lion下的最新版:https://distfiles.macports.org/MacPorts/MacPorts-2.1.1-10.7-Lion.pkg
如果MacPort出现新版本,可以直接通过如下命令进行更新:
$ sudo port -v selfupdate
添加MacPort到环境变量,vi ~/.bash_profile
export PATH=${PATH}:/opt/local/bin:/opt/local/sbin:/opt/local/share/man
3. 比如安装bash的自动补全软件:
$ sudo port install bash-completion
Error: No valid Xcode installation is properly selected.
Error: Please use xcode-select to select an Xcode installation:
Error: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer # version 4.3.2
Error: sudo xcode-select -switch /Users/zhaobinjie/soft/Xcode.app/Contents/Developer # version 4.3.2
错误解决方法,1)设置xcode-select的路径,2)安装命令行工具:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
You can get Xcode from the Mac App Store as a free download. From within that (in the preferences | downloads) you can download and install the command line tools.
4. MacPort常用操作
查询安装的ports
$ port -qv install
当安装新的系统时,卸载安装的ports
$ sudo port -fp uninstall --follow-dependents installed
清除所有局部的构建
$ sudo port clean all
安装必须的ports
$ sudo port install portname +variant1 +variant2 …
5. 删除MacPorts:
#原版使用MacPorts安装过的软件在/opt/local目录下,删除之前最好查看下,心里有个数.
$ sudo port -f 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
Reference:
http://www.macports.org/install.php
http://hi.hiing.net/2011/06/use-homebrew-package-management.html
习惯mac . OS X 安装MacPorts的更多相关文章
- Xamarin+Prism开发详解四:简单Mac OS 虚拟机安装方法与Visual Studio for Mac 初体验
Mac OS 虚拟机安装方法 最近把自己的电脑升级了一下SSD固态硬盘,总算是有容量安装Mac 虚拟机了!经过心碎的安装探索,尝试了国内外的各种安装方法,最后在youtube上找到了一个好方法. 简单 ...
- wget Mac OS 下安装
wget是一个从网络上自动下载文件的自由工具,支持通过HTTP.HTTPS.FTP三个最常见的TCP/IP协议下载,并可以使用HTTP代理. 下面介绍如何在Mac OS 下安装Wget 下载最新版的 ...
- Mac OS X安装OpenGL
Mac OS X安装OpenGL 安装最新的cmake brew install cmake brew upgrade cmake 安装glew brew install glew 安装GLTools ...
- TensorFlow 安装官方教程:Ubuntu 安装,Mac OS X 安装,Windows 安装
从我的使用体验来看 Ubuntu 是最好的, Mac 没有显卡,后期跑大项目比较鸡肋,Windows 安装各种依赖各种坑.Ubuntu 安装 TensorFlow 方便,后面安装 TensorFl ...
- Mac OS X中MacPorts的安装使用备忘
Mac下面除了用dmg.pkg来安装软件外,比较方便的还有用MacPorts来帮助你安装其他应用程序,跟BSD中的ports道理一样.MacPorts就像apt-get.yum一样,可以快速安装些软件 ...
- Mac OS X 安装 brew 工具!
最早的ports管理就是BSD那种,后来出现强大的Debian,弄了个dpkg+apt! Mac OS X 最早使用比较多的工具是 MacPorts,但是现在来看这个工具有点老,不是很稳定,那我们推荐 ...
- 【Mac】Mac OS X 安装GNU命令行工具
macos的很多用户都是做it相关的人,类unix系统带来了很多方面,尤其是经常和linux打交道的人. 但是作为经常使用linux 命令行的人发现macos中的命令行工具很多都是bsd工具,跟lin ...
- 以 MAMP 为 Mac OS X 安装并设置 PHP开发环境
PHP 页需要通过 Web 服务器处理.因此,要在 Dreamweaver 中使用 PHP 进行开发,您需要访问支持 PHP 的 Web 服务器和 MySQL 数据库.phpMyAdmin 也很实用, ...
- 在Mac OS上安装Vagrant和Docker的教程
转载于:http://www.itxuexiwang.com/a/shujukujishu/redis/2016/0216/128.html?1455808640 当听到很多人在说Docker是多么多 ...
随机推荐
- HoloLens开发手记 - Unity之Keyboard input 键盘输入
虽然HoloLens支持很多种输入方式,包括蓝牙键盘在内.但是大部分应用还是不能断定用户有物理键盘可以输入,所以虚拟键盘输入还是必须要提供的. Unity提供了一个TouchScreenKeyboar ...
- ASP Request.ServerVariables 参数集
转自:http://blog.csdn.net/chinmo/article/details/2096871 Request.ServerVariables("Url") 返回服务 ...
- ArrayList List<T> T[] Array
ArrayList 其实就是一个存储obj列表的类 ArrayList 接受 null 作为有效值并且允许重复的元素. 不保证会对 ArrayList 排序. 在执行需要对 ArrayList ...
- TCP的三次握手和四次挥手
置顶文章:<纯CSS打造银色MacBook Air(完整版)> 上一篇:<两个简单的Loading> 作者主页:myvin 博主QQ:851399101(点击QQ和博主发起临时 ...
- codevs 1378选课 树形DP
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; ],tr[] ...
- 使用Owin中间件搭建OAuth2.0认证授权服务器
前言 这里主要总结下本人最近半个月关于搭建OAuth2.0服务器工作的经验.至于为何需要OAuth2.0.为何是Owin.什么是Owin等问题,不再赘述.我假定读者是使用Asp.Net,并需要搭建OA ...
- "use strict"
"use strict";//严格模式 <!doctype html> <html> <head> <meta charset=" ...
- Solr -- 实时搜索
在solr中,实时搜索有3种方案 ①soft commit,这其实是近实时搜索,不能完全实时. ②RealTimeGet,这是实时,但只支持根据文档ID的查询. ③和第一种类似,只是触发softcom ...
- ThinkPHP多表联合查询的常用方法
1.原生查询示例: $Model = new Model(); $sql = 'select a.id,a.title,b.content from think_test1 as a, think_t ...
- bzoj2054 疯狂的馒头
bzoj上现在找不到这题,所以目前只是过了样例,没有测 2054: 疯狂的馒头 Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 715 Solved: ...