macでfinkインストール
環境
Mac 10.10.5
インストール理由
apt-getを使いたい。
手順
- 公式サイトからダウンロードする
Fink - Source Release Download
- 解凍し、コマンドラインでフォルダに入って、実行する
$ cd cd /Users/*username*/Downloads/fink-0.41.1 $ ./bootstrap
いきなり質問コーナーが出てくる
Fink must be installed and run with superuser (root) privileges. Fink can automatically try to become root when it's run from a user account. Since you're currently running this script as a normal user, the method you choose will also be used immediately for this script. Available methods: (1) Use sudo (2) Use su (3) None, fink must be run as root Choose a method: [1] Password:
普通だったら、ディフォルトでreturn(enter)押し続ければ大丈夫みたいですが、
Please install an Oracle JDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html or http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html or the Apple Legacy Java package from http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2014-001.dmg before re-attempting the fink bootstrap.
finkインストールする前にOracle JDK入れてくださいって言われた。
- 指示通り、公式サイト行って、ダウンロードする、JDK8をインストールすることになった
Java SE Development Kit 8 - Downloads
- 気を取り直して、先ほどのコマンドラインでもう一回
$ ./bootstrap
質問に対して、全部ディフォルトでreturn(enter)押し続ければ大丈夫と思いきや、 次へ進むために、x11(XQuartz)必要ですって、いきなりアラーム出てきた。
それでXQuartzの公式サイトへ
ダウンロード&インストールしたら、ターミナルのインストールめっちゃ進んでた。
$ /sw/bin/pathsetup.sh OK
OK出ました!!ターミナル再起動したら、finkが使えるようになりました!
$ fink -V Package manager version: 0.41.1 Distribution version: selfupdate-point (bootstrap), 10.10, x86_64 Trees: local/main stable/main Copyright (c) 2001 Christoph Pfisterer Copyright (c) 2001-2016 The Fink Package Manager Team This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
使いたいapt-get使えるようになった!
$ apt-get apt 0.5.4 for darwin x86_64 compiled on Apr 4 2017 15:43:49 Usage: apt-get [options] command apt-get [options] install|remove pkg1 [pkg2 ...] apt-get [options] source pkg1 [pkg2 ...] apt-get is a simple command line interface for downloading and installing packages. The most frequently used commands are update and install.
補足1
実は先ほどインストール完了した時に、こういうメッセージ出てきたんだけど、
Run '. /sw/bin/init.sh' to set up this terminal session environment to use Fink. To make the software installed by Fink available in all of your future terminal shells, add '. /sw/bin/init.sh' to the init script '.profile' or '.bash_profile' in your home directory. The program /sw/bin/pathsetup.sh can help with this. Enjoy.
実際コマンドラインで
$ /sw/bin/init.sh
実行したら、not permittedって怒られた。sudo /sw/bin/init.sh入れてもダメっぽいだったので、参考サイト書いてるコマンドを信じ、入れてみて、無事に成功した。
補足2
不安でpath環境変数を確認したい場合、
$ cd ~ $ cat .bash_profile
そこに
test -r /sw/bin/init.sh && . /sw/bin/init.sh
これがちゃんと入っているなら、大丈夫です。