MacPorts¶
インストール¶
MacPorts公式サイトのQuickstartページから、macOSバージョンに対応した pkg ファイル(macOS インストーラー)をダウンロードします。
https://www.macports.org/install.php
macOS 15 Sequoia の場合、ダウンロードファイル名は MacPorts-2.11.4-15-Sequoia.pkg でした。実行するとインストールが行われます。
コマンドは、/opt/local/binの下にインストールされるので、シェルの設定で環境変数PATHなどを設定する必要があります。
PATH="/opt/local/bin:$PATH"
macOSのアップデート時¶
macOS Tahoe¶
macOSのバージョンをアップすると、portコマンドがエラーとなります。
~ % port Error: Current platform "darwin 25" does not match expected platform "darwin 24" Error: Please run 'sudo port migrate' or follow the migration instructions: https://trac.macports.org/wiki/Migration OS platform mismatch while executing "mportinit ui_options global_options global_variations" Error: /opt/local/bin/port: Failed to initialize MacPorts, OS platform mismatch
メッセージにあるように、sudo port migrate
を実行します。
portコマンド¶
インストール一覧¶
port installed
パッケージのインストール記録¶
GIS¶
QGIS¶
QGISのLTR(Long Term Release)を MacPorts経由でインストールしました。2025年8月時点でLTRは、バージョン3.40となります。
% sudo port install qgis3-ltr
結構な数のパッケージがダウンロードされ、インストールされ、ものによってはビルドされるので、結構時間がかかります。
インストールが終わると、Launchpad(ランチャー)にQGISが追加されるので、これを実行するとQGISが立ち上がります。