Mac中MacPorts安装和使用 MacPorts简介
MacPorts,曾经叫做DarwinPorts,是一个软件包管理系统,用来简化Mac OS X和Darwin操作系统上软件的安装。它是一个用来简化自由软件/开放源代码软件的安装的自由/开放源代码项目,与Fink和BSD类ports套件的目标和功能类似。跟BSD中的ports道理一样。MacPorts就像apt-get、yum一样,可以快速安装些软件。
MacPorts下载与安装
一.通过(.pkg)安装: Mac OS X Package (.pkg) Installer
访问官方网站: http://www.macports.org/install.php
http://distfiles.macports.org/MacPorts/MacPorts-2.1.1-10.7-Lion.pkg
二.通过(Source)安装MacPorts:Source Installation
1.cd到Downloads/目录下wget下载 MacPorts-2.1.1.tar.gz
输入: wget https://distfiles.macports.org/MacPorts/MacPorts-2.1.1.tar.gz
2.解压 MacPorts-2.1.1.tar.gz 输入: tar zxvf MacPorts-2.1.1.tar.gz (tar jxvf MacPorts2.1.1.tar.bz2)
3.cd到解压到的目录MacPorts-2.1.1输入: ./configure && make && sudo make install 安装
中间提示输入密码完成安装!
7.然后将/opt/local/bin和/opt/local/sbin添加到$PATH搜索路径中
编辑/etc/profile文件 $ sudo vim /etc/profile (特许编辑,强制保存退出 wq!)文件最后加上下面两句
|
1
2
|
export PATH=/opt/local/bin:$PATHexport PATH=/opt/local/sbin:$PATH |
MacPorts使用
1.Mac Port中第三方软件下载包存放的默认路径是:/opt/local/var/macports/distfiles/
为了提高安装速度,可以在安装新port时直接将此目录下的文件拷贝到新的Mac Port相同的目录中就可以避免Port去网上下载。
2.使用Mac Port前应该首先更新Port的index
输入: $ sudo port -v selfupdate (强烈推荐第一次运行的时候使用-v参数,显示详细的更新过程)
3.查看Mac Port中当前可用的软件包及其版本 输入: $ port list
4.查看有更新的软件以及版本 输入: $ port outdated
5.升级可以更新的软件 输入: $ sudo port upgrade outdated
6.在Mac Port搜索需要安装的软件包 输入: $ port search maven
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
HuiMinmatoMacBook-Pro:Downloads zikercn$ port search mavenmaven @1.0.2 (java, devel) stub port, use maven1 insteadmaven-ant-tasks @2.1.3 (devel, java) Use many of Maven's artifact handling features from Ant.maven1 @1.1 (java, devel) A java-based build and project management environment.maven2 @2.2.1 (java, devel) A java-based build and project management environment.maven3 @3.0.4 (java, devel) A java-based build and project management environment.maven_select @0.3 (sysutils) common files for selecting default Maven versionFound 6 ports. |
7.搜索到需要安装的软件包之后,如何查看具体的软件包的内容和说明
输入: $ port info maven3
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
maven3 @3.0.4 (java, devel)Description: Maven is a Java project management and project comprehension tool. Maven is based on the concept of a project object model (POM) in that all the artifacts produced by Maven are a result of consulting a well defined model for your project.Builds, documentation, source metrics, and source cross-references are all controlled by your POM. Maven 3 aims to ensure backward compatibility with Maven 2, improve usability, increase performance, allow safe embedding, and pave the way to implement many highly demanded features.Homepage: http://maven.apache.org/Build Dependencies: kaffeRuntime Dependencies: maven_selectPlatforms: darwinLicense: unknownMaintainers: blair@macports.org, gk5885@kickstyle.net |
8.查看即将安装的或者已经安装的软件包的依赖关系
输入: $ port deps maven3
|
1
2
3
|
Full Name: maven3 @3.0.4_0Build Dependencies: kaffeRuntime Dependencies: maven_select |
9. 查看安装时允许客户定制的参数 输入: $ port variants maven3
|
1
|
maven3 has no variants |
10.查看了软件包的内容和说明,并确认确实要安装,则输入: $ sudo port install maven3
|
1
2
3
4
5
6
7
|
To make maven 3.0.4 the default, please run sudo port select --set maven maven3---> Cleaning maven3---> Updating database of binaries: 100.0%---> Scanning binaries for linking errors: 100.0%---> No broken files found. |
11. 卸载已经用Mac Port安装的软件 输入: $ sudo port uninstall maven3
|
1
2
3
4
|
---> Deactivating maven3 @3.0.4_0---> Cleaning maven3---> Uninstalling maven3 @3.0.4_0---> Cleaning maven3 |
MacPorts卸载删除
1.卸载原有的MacPorts(如果你没有安装,直接跳过这一步,输入: $ port version 查看)
#原版使用MacPorts安装过的软件在/opt/local目录下,删除之前最好查看下,心里有个数.
|
1
2
3
4
5
6
7
8
9
10
11
12
|
sudo port -f uninstall installedsudo 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 |
Mac中MacPorts安装和使用 MacPorts简介的更多相关文章
- Mac中编译安装Qt 4.4
解压下载到的.gz源码:gunzip xxx.tar.gztar xvf xxx.tar, 其实在Mac中可以直接双击解压的.然后定位到解压后的目录下:./configuremakesudo make ...
- ALC662 在Mac中的安装
最近在装黑苹果,一切还算顺利(整了两周),就是ICH7的ALC662一直无法驱动成功.经过两天的爬文,终于成功了.以下是我的一点经验. 我装的是最新的10.9.2,显卡驱动是自带的(我的显卡为GT62 ...
- Mac中Eclipse安装和使用svn
Eclipse版本为Neon Release (4.6.0) 安装svn 安装HomeBrew 在终端中输入 ruby -e "$(curl -fsSL https://raw.github ...
- Node: 在Mac中离线安装Sqlite3
最近在安装db-migrate的时候,有一个依赖包sqlite3怎样都安装不了,检查下来应该是由于node_sqlit3.node文件无法从Amazon下载导致(源码安装也报错,没有研究过原因).于是 ...
- MAC中怎么安装python
转自:https://blog.csdn.net/hou_manager/article/details/79555809 一.Python 介绍 Python介绍 Python3在2008年12月3 ...
- mac中eclipse安装openExplore插件
插件地址:https://github.com/samsonw/OpenExplorer/downloads 将下载的jar包放入下面地址:应用程序->eclipse.app,右击->打开 ...
- redis在mac中的安装和启动
http://blog.csdn.net/chenshuai1993/article/details/51519384 http://www.jianshu.com/p/6b5eca8d908b
- python语言特点简介 以及在Windows以及Mac中安装以及配置的注意事项
正如前一篇随笔所提到的,python属于解释型语言 python语言有两个特点: 1.胶水语言(历史遗留问题,原来Perl语言作为Unix内置标准件,获得极大追捧,作为竞争者的python一开始是作为 ...
- Thrift入门之mac下的安装流程
新建一个maven项目,先下载maven依赖 http://thrift.apache.org/download <dependency> <groupId>org.apac ...
随机推荐
- DNS服务简介
一.域名系统 1.域名系统概述 域名系统DNS(Domain Name System)是因特网使用的命名系统,用来把便于人们使用的机器名字转换成为IP地址.域名系统其实就是名字系统.为什么不叫“名字” ...
- HDU2256&&HDU4565:给一个式子的求第n项的矩阵快速幂
HDU2256 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2256 题意:求(sqrt(2)+sqrt(3))^2n%1024是多少. 这个题算是h ...
- [iOS微博项目 - 4.0] - 自定义微博cell
github: https://github.com/hellovoidworld/HVWWeibo A.自定义微博cell基本结构 1.需求 创建自定义cell的雏形 cell包含:内容.工具条 内 ...
- Logstash之时区问题的建议和修改---filter---and duplicate resolution.
2. logstash es duplicate https://logstash.jira.com/browse/LOGSTASH-1875 https://logstash.jira.com/br ...
- Python 之父谈放弃 Python:我对核心成员们失望至极!
Python 之父讲述退位原因,以及 Python 的未来将何去何从. 在 Python 社区,Python 的发明者 Guido Van Rossum 被称为 “仁慈的终生独裁者”(BDFL,B ...
- DRF频率、分页、解析器、渲染器
DRF的频率 频率限制是做什么的 开放平台的API接口调用需要限制其频率,以节约服务器资源和避免恶意的频繁调用. 频率组件原理 DRF中的频率控制基本原理是基于访问次数和时间的,当然我们可以通过自己定 ...
- Spring-Spring Bean后置处理器
Spring Bean后置处理器 BeanPostProcessor接口定义回调方法,你可以实现该方法来提供自己的实例化逻辑,依赖解析逻辑等.你也可以在Spring容器通过插入一个或多个BeanPos ...
- http://echarts.baidu.com/demo.html#effectScatter-map
http://echarts.baidu.com/demo.html#effectScatter-map
- 文字识别的google的库 tesseract
https://github.com/tesseract-ocr/tesseract https://github.com/tesseract-ocr/tessdata 字体识 ...
- 【开发者笔记】解析具有合并单元格的Excel
最近公司让做各种数据表格的导入导出,就涉及到电子表格的解析,做了这么多天总结一下心得. 工具:NOPI 语言:C# 目的:因为涉及到导入到数据库,具有合并单元格的多行必然要拆分,而NPOI自动解析的时 ...