日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

Mac中MacPorts安装和使用 MacPorts简介

發(fā)布時(shí)間:2023/12/20 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Mac中MacPorts安装和使用 MacPorts简介 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

MacPorts,曾經(jīng)叫做DarwinPorts,是一個(gè)軟件包管理系統(tǒng),用來(lái)簡(jiǎn)化Mac OS X和Darwin操作系統(tǒng)上軟件的安裝。它是一個(gè)用來(lái)簡(jiǎn)化自由軟件/開放源代碼軟件的安裝的自由/開放源代碼項(xiàng)目,與Fink和BSD類ports套件的目標(biāo)和功能類似。跟BSD中的ports道理一樣。MacPorts就像apt-get、yum一樣,可以快速安裝些軟件。

MacPorts下載與安裝


一.通過(guò)(.pkg)安裝: Mac OS X Package (.pkg) Installer

訪問(wèn)官方網(wǎng)站:?http://www.macports.org/install.php
http://distfiles.macports.org/MacPorts/MacPorts-2.1.1-10.7-Lion.pkg

二.通過(guò)(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?(特許編輯,強(qiáng)制保存退出 wq!)文件最后加上下面兩句

1 2 export?PATH=/opt/local/bin:$PATH export?PATH=/opt/local/sbin:$PATH

MacPorts使用


1.Mac Port中第三方軟件下載包存放的默認(rèn)路徑是:/opt/local/var/macports/distfiles/
為了提高安裝速度,可以在安裝新port時(shí)直接將此目錄下的文件拷貝到新的Mac Port相同的目錄中就可以避免Port去網(wǎng)上下載。

2.使用Mac Port前應(yīng)該首先更新Port的index
輸入: $?sudo port -v selfupdate?(強(qiáng)烈推薦第一次運(yùn)行的時(shí)候使用-v參數(shù),顯示詳細(xì)的更新過(guò)程)

3.查看Mac Port中當(dāng)前可用的軟件包及其版本 輸入: $?port list

4.查看有更新的軟件以及版本 輸入:?$?port outdated

5.升級(jí)可以更新的軟件 輸入: $?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 maven maven @1.0.2 (java, devel) ????stub port, use maven1 instead maven-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 version Found 6 ports.

7.搜索到需要安裝的軟件包之后,如何查看具體的軟件包的內(nèi)容和說(shuō)明
輸入: $?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:?? kaffe Runtime Dependencies: maven_select Platforms:??????????? darwin License:????????????? unknown Maintainers:????????? blair@macports.org, gk5885@kickstyle.net

8.查看即將安裝的或者已經(jīng)安裝的軟件包的依賴關(guān)系
輸入: $?port deps maven3

1 2 3 Full Name: maven3 @3.0.4_0 Build Dependencies:?? kaffe Runtime Dependencies: maven_select

9. 查看安裝時(shí)允許客戶定制的參數(shù) 輸入: $?port variants maven3

1 maven3 has no variants

10.查看了軟件包的內(nèi)容和說(shuō)明,并確認(rèn)確實(shí)要安裝,則輸入: $?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. 卸載已經(jīng)用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(如果你沒有安裝,直接跳過(guò)這一步,輸入: $?port version?查看)
#原版使用MacPorts安裝過(guò)的軟件在/opt/local目錄下,刪除之前最好查看下,心里有個(gè)數(shù).

1 2 3 4 5 6 7 8 9 10 11 12 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

轉(zhuǎn)載于:https://www.cnblogs.com/askDing/p/6270477.html

總結(jié)

以上是生活随笔為你收集整理的Mac中MacPorts安装和使用 MacPorts简介的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。