OSX10.8サーバ その29 Macports

Mの更新(Mountain Lion OSX10.8サーバ) その29 MacPorts

MacPorts とはMacOSXのアプリケーションパッケージをインストールするのに便利な道具だ。Appleが提供するアプリではなく、open sourceのアプリをインストールするのが楽になる。コンパイルなんかしたくない。

 

https://distfiles.macports.org/MacPorts/MacPorts-2.1.2.tar.bz2をダウンロードして解凍し、適当な所に置く。どこでもいいが、とりあえず/usr/local につっこんでおいた。

sh-3.2# cd /usr/localmacports-2.1.2 で

sh-3.2#  ./configure
checking build system type… x86_64-apple-darwin12.2.0
checking host system type… x86_64-apple-darwin12.2.0
……
config.status: creating src/config.h
sh-3.2# make
===> making all in doc
……
===> making all in tests
make[1]: Nothing to be done for `all’.
sh-3.2# make install
===> making install in doc
……
Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, add /opt/local/bin to your PATH and run:

sudo port -v selfupdate

Please read “man port”, the MacPorts guide at http://guide.macports.org/ and Wiki at https://trac.macports.org/ for full documentation.

と終了する。PATHを設定しろと最後に行っているので

~/.bash_profile  に

PATH=/opt/local/bin:/opt/local/sbin:$PATH
MANPATH=/opt/local/man:$MANPATH

の2行を書き加えておいた。

/opt にすべてインストールされたことになる。

アップデートする。

/opt/local/bin で、

sh-3.2# ./port selfupdate
—> Updating MacPorts base sources using rsync
MacPorts base version 2.1.2 installed,
MacPorts base version 2.1.3 downloaded.
—> Updating the ports tree
—> MacPorts base is outdated, installing new version 2.1.3
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl

The ports tree has been updated. To upgrade your installed ports, you should run
port upgrade outdated

とアプデートされた。

ports のリストの同期を行っておく。

sh-3.2# ./port sync
—> Updating the ports tree
sh-3.2#

MacPortsの基本的なコマンド
$sudo port selfupdate
MacPortsを最新のものにアップデートする。

$sudo port sync
MacPortsで用意されているportsのリストを更新する。

$sudo port install +<v_hoge>
をvariants<v_hoge>付きでインストールする。
例) pTeXのutf8版をインストールする。
$sudo port install pTeX +utf8

$port installed
インストール済みのツール一覧を表示する。

$port installed
インストールされているツールに関する情報を表示する。
例) $port installed pTeX

$port variants
のvariantsの情報を表示する。variantsとは、インストールできるソフトにつけることができるオプションのことである。
例) port variants pTeX

$port outdated
インストールされているportsの中に古いものが無いか調べ、もしある場合にはその古いportsを表示する。

$sudo port upgrade installed
インストールされている中で既に新しいバージョンが出ているportsを、一括でアップグレードする。この際、古いportsはinactiveな状態で残る。

$sudo port uninstall inactive
使われていない(inactiveな)portsを、一括でアンインストールする。

$sudo port deactivate
activeな状態のというportsを、inactiveな状態にする。アンインストールはされず、ディスク上には残る。

$sudo port activate
inactiveな状態のというportsを、activeな状態にする。

「OSX10.8サーバ その29 Macports」への1件のフィードバック

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください