Fink

fink

Fink は、Mac OS X に UNIX のアプリケーションをインストールするソフトです。Fink があるおかげで(正確には Fink の開発者・管理者と、個々のソフトの管理者のおかげで)、リナックス(Linux)上で動作するほとんどのアプリケーションを Mac OS X に簡単にインストールする(ポートする)ことができます。Fink の他に、MacPorts という同じ機能を持つソフトがありますが、現在のところ、ほとんどの結晶構造解析ソフトは MacPorts を用いてインストールすることができません。


Fink を用いる利点

Fink は、構造解析ソフトを集中管理します。その利点として、アップデートが楽にできることが挙げられます。アップデートは、以下の2つのコマンドをターミナルで順々に実行するだけで、自動的に行われます。

fink selfupdate
fink update-all

Fink を用いるもう1つの利点は、個々のソフトについてパスの設定を行う必要がないことです。個々のソフトのパスは、Fink をインストールした後に以下のコマンドをターミナルで実行することで、設定する必要がなくなります。以下のコマンドは、どの種類のシェルでも実行可能であり、Fink および Fink を用いてインストールしたソフトの環境が整います。シェルの種類については、こちらのページをご覧ください。

/sw/bin/pathsetup.sh


インストール方法

Fink をインストールするためには、Xcode が必要なのでインストールしていない場合はそちらのインストールからまず行ってください。Fink のソースコードは、Fink プロジェクトのホームページの左側のダウンロード・セクションからダウンロードできます。ダウンロードしたファイルをダブルクリックすると、フォルダができます。次にフォルダをダブルクリックして Finder ウインドウを開き、その場所をターミナルで開いてください(ツールバーの「ターミナルに開く」または「iTerm に開く」をクリック)。

Fink source code

Fink のインストールを以下のコマンドで開始します。

./bootstrap

Fink の使用はコンピュータの管理者権限を必要とします。インストールを実行すると、管理者権限の種類を聞いてきますので、(1) sudo を選択し、パスワードを入力します。

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. Avaliable methods:

(1)     Use sudo
(2)     Use su
(3)     None, fink must be run as root

Choose a method: [1]

Password:

次に、64 bit 版をインストールするか聞いてきます。プロセッサーが 64 bit に対応していれば、64 bit 版のインストールをお勧めします。多くの結晶構造解析ソフトは既に 64 bit 版が用意されています。パソコンが 64 bit に対応しているか調べるために、新しいターミナルウインドウを開き、以下のコマンドを実行します。

sysctl hw | grep 64bit

64 bit に対応していれば、

hw.cpu64bit_capable: 1

対応していなければ、

hw.cpu64bit_capable: 0

と表示されます。64 bit 版をインストールする場合、”2″ を選択します。

Your hardware is a 64bit-compatible intel processor, so you have 
the option of running Fink in 64bit-only mode.  This is not recommended 
for most users, since many more packages are available for the default 
mode (which is mostly 32bit but includes some 64bit packages).  Which 
mode would you like to use?

(1)     Default (mostly 32bit)
(2)     64bit-only

Choose a mode: [1] 2

続きの設定を以下に示します。参考にしてください。

Please choose the path where Fink should be installed. Note that 
you will be able to use the binary distribution only if you choose '/sw'. [/sw]
In what additional directory should Fink look for downloaded tarballs? [] 
Which directory should Fink use to build packages? (If you don't know what 
this means, it is safe to leave it at its default.) [] 
Fink does not yet support an official set of binary packages for your current distribution.

=> Setting UseBinaryDist to 'false'

The selfupdate method has not been set yet, so you are not yet being asked 
whether to include the "unstable" fink tree. If you are interested in the 
"unstable" tree, first run "fink selfupdate" and then run "fink configure" again.

(1)     Quiet (do not show download statistics)
(2)     Low (do not show tarballs being expanded)
(3)     Medium (will show almost everything)
(4)     High (will show everything)

How verbose should Fink be? [2] 4

Proxy/Firewall settings
Enter the URL of the HTTP proxy to use, or 'none' for no proxy. The URL 
should start with http:// and may contain username, password, and/or 
port specifications. Note that this value will be visible to all users 
on your computer.
Example, http://username:password@hostname:port
Your proxy:  [none] 
Enter the URL of the FTP proxy to use, or 'none' for no proxy. The URL 
should start with http:// and may contain username, password, and/or 
port specifications. Note that this value will be visible to all users 
on your computer.
Example, http://username:password@hostname:port
Your proxy:  [none] 
Use passive mode FTP transfers (to get through a firewall)? [Y/n] 

Mirror selection

The Fink team maintains mirrors known as "Master" mirrors, which contain 
the sources for all fink packages. You can choose to use these mirrors 
first, last, never, or mixed in with regular mirrors. If you don't care, 
just select the default.

(1)     Search "Master" source mirrors first.
(2)     Search "Master" source mirrors last.
(3)     Never use "Master" source mirrors.
(4)     Search closest source mirrors first. (combine all mirrors into one set)

What mirror order should fink use when downloading sources? [1] 

Choose a continent:

(1)     Africa
(2)     Asia
(3)     Australia
(4)     Europe
(5)     North America
(6)     South America, Middle America and Caribbean

Your continent? [2] 

Choose a country:

(1)     No selection - display all mirrors on the continent
(2)     Armenia
(3)     China
(4)     Georgia
(5)     Hong Kong
(6)     India
(7)     Indonesia
(8)     Iran
(9)     Japan
(10)    Malaysia
(11)    Philippines
(12)    Saudi Arabia
(13)    Singapore
(14)    South Korea
(15)    Taiwan
(16)    Thailand
(17)    Vietnam

Your country? [9] 

Choose a mirror for 'Master Fink mirrors':

(1)     Primary: http://distfiles.master.finkmirrors.net/
(2)     Japan: http://distfiles.hnd.jp.asi.finkmirrors.net/

Mirror for Master Fink mirrors? [1] 2

Choose a mirror for 'RSync SelfUpdate':

(1)     Primary: rsync://distfiles.master.finkmirrors.net/finkinfo/
(2)     Japan: rsync://hnd.jp.asi.finkmirrors.net/finkinfo/

Mirror for RSync SelfUpdate? [1] 2

Choose a mirror for 'Apt-Get Repository':

(1)     Primary: http://bindist.finkmirrors.net/bindist
(2)     Japan: http://fink.sodan.ecc.u-tokyo.ac.jp/bindist/bindist

Mirror for Apt-Get Repository? [1] 2

Choose a mirror for 'GNU software':

(1)     Primary: ftp://ftp.gnu.org/gnu
(2)     Japan: ftp://ftp.ring.gr.jp/pub/GNU
(3)     Japan: ftp://tron.um.u-tokyo.ac.jp/pub/GNU
(4)     Japan: http://core.ring.gr.jp/pub/GNU

Mirror for GNU software? [1] 2

Choose a mirror for 'GNOME':

(1)     Primary: ftp://ftp.gnome.org/pub/GNOME
(2)     Japan: ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME

Mirror for GNOME? [1] 2

Choose a mirror for 'The GIMP':

(1)     Primary: ftp://ftp.gimp.org/pub/gimp
(2)     Japan: ftp://ftp.ring.gr.jp/pub/graphics/gimp
(3)     Japan: ftp://ftp.u-aizu.ac.jp/pub/graphics/tools/gimp/gimp
(4)     Japan: http://www.ring.gr.jp/pub/graphics/gimp

Mirror for The GIMP? [1] 2

Choose a mirror for 'Comprehensive TeX Archive Network':

(1)     Primary: ftp://tug.ctan.org/tex-archive
(2)     Japan: ftp://ftp.lab.kdd.co.jp/CTAN
(3)     Japan: ftp://ftp.nara.wide.ad.jp/pub/TeX/CTAN
(4)     Japan: ftp://ftp.riken.go.jp/pub/tex-archive
(5)     Japan: ftp://ftp.u-aizu.ac.jp/pub/tex/CTAN
(6)     Japan: http://ftp.lab.kdd.co.jp/CTAN
(7)     Japan: http://ftp.nara.wide.ad.jp/pub/TeX/CTAN
(8)     Japan: http://ftp.riken.go.jp/pub/tex-archive
(9)     Japan: http://ftp.yz.yamagata-u.ac.jp/pub/CTAN

Mirror for Comprehensive TeX Archive Network? [1] 2

Choose a mirror for 'Comprehensive Perl Archive Network':

(1)     Primary: ftp://ftp.cpan.org/pub/CPAN
(2)     Japan: ftp://ftp.dti.ad.jp/pub/lang/CPAN
(3)     Japan: ftp://ftp.kddilabs.jp/CPAN
(4)     Japan: ftp://ftp.nara.wide.ad.jp/pub/CPAN
(5)     Japan: ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN
(6)     Japan: ftp://ftp.u-aizu.ac.jp/pub/CPAN
(7)     Japan: ftp://ftp.yz.yamagata-u.ac.jp/pub/lang/cpan
(8)     Japan: http://ftp.cpan.jp
(9)     Japan: http://ftp.nara.wide.ad.jp/pub/CPAN
(10)    Japan: http://ftp.yz.yamagata-u.ac.jp/pub/lang/cpan

Mirror for Comprehensive Perl Archive Network? [1] 2

Choose a mirror for 'Debian':

(1)     Primary: ftp://ftp.debian.org/debian
(2)     Japan: http://ftp.jp.debian.org/debian
(3)     Japan: http://ftp2.jp.debian.org/debian

Mirror for Debian? [1] 2

Choose a mirror for 'FreeBSD':

(1)     Primary: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles
(2)     Japan: ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles
(3)     Japan: ftp://ftp2.jp.freebsd.org/pub/FreeBSD/ports/distfiles
(4)     Japan: ftp://ftp3.jp.freebsd.org/pub/FreeBSD/ports/distfiles
(5)     Japan: ftp://ftp4.jp.freebsd.org/pub/FreeBSD/ports/distfiles
(6)     Japan: ftp://ftp5.jp.freebsd.org/pub/FreeBSD/ports/distfiles
(7)     Japan: ftp://ftp6.jp.freebsd.org/pub/FreeBSD/ports/distfiles
(8)     Japan: ftp://ftp7.jp.freebsd.org/pub/FreeBSD/ports/distfiles
(9)     Japan: ftp://ftp8.jp.freebsd.org/pub/FreeBSD/ports/distfiles
(10)    Japan: ftp://ftp9.jp.freebsd.org/pub/FreeBSD/ports/distfiles

Mirror for FreeBSD? [1] 2

Choose a mirror for 'KDE':

(1)     Primary: ftp://ftp.kde.org/pub/kde
(2)     Japan: ftp://ftp.kddlabs.co.jp/pub/X11/kde
(3)     Japan: ftp://ftp.ring.gr.jp/pub/X/kde
(4)     Japan: ftp://ring.asahi-net.or.jp/pub/X/kde
(5)     Japan: http://ftp.kddlabs.co.jp/pub/X11/kde
(6)     Japan: http://ftp.ring.gr.jp/pub/X/kde
(7)     Japan: http://ftp.yz.yamagata-u.ac.jp/pub/X11/wm/kde
(8)     Japan: http://ring.asahi-net.or.jp/pub/X/kde

Mirror for KDE? [1] 2

Choose a mirror for 'SourceForge':

(1)     Primary: http://superb-west.dl.sourceforge.net/sourceforge/
(2)     Japan: http://jaist.dl.sourceforge.net/sourceforge/

Mirror for SourceForge? [1] 2

Choose a mirror for 'The Apache Project':

(1)     Primary: http://www.apache.org/dist
(2)     Japan: ftp://ftp.kddilabs.jp/infosystems/apache
(3)     Japan: ftp://ftp.meisei-u.ac.jp/pub/www/apache/dist
(4)     Japan: ftp://ftp.riken.jp/net/apache
(5)     Japan: http://ftp.kddilabs.jp/infosystems/apache
(6)     Japan: http://ftp.riken.jp/net/apache
(7)     Japan: http://www.meisei-u.ac.jp/mirror/apache/dist

Mirror for The Apache Project? [1] 2

Writing updated configuration to '/sw/etc/fink.conf'...
plist is dpkg-bootstrap
Bootstrapping a base system via /sw/bootstrap.
Scanning package description files..........
Information about 312 packages read in 0 seconds.

途中で Mirror selection を変更するか聞いてきますが、リターンキーを押して先に進みます。

Mirror selection

Default answer will be chosen in 60 seconds...
The list of possible mirrors in fink has been updated.  Do you want to review and change your choices? [y/N]

インストールが正常に終了すると、以下のメッセージがターミナルに表示されます。

BOOTSTRAP DONE. Cleaning up.

/bin/rm -f /sw/fink/dists/stable/main/finkinfo/base/dpkg-bootstrap.info /sw/fink/dists/stable/main/finkinfo/base/dpkg-bootstrap.patch /sw/fink/dists/stable/main/finkinfo/base/perl588-bootstrap.info
/sw/bin/fink scanpackages
Updating the list of locally available binary packages.
Scanning dists/local/main/binary-darwin-x86_64
Scanning dists/stable/main/binary-darwin-x86_64
Scanning dists/stable/crypto/binary-darwin-x86_64

You should now have a working Fink installation in '/sw'. You still 
need package descriptions if you want to compile packages yourself. 
You can get them by running the command 'fink selfupdate'.

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.

次に、”fink selfupdate” を実行します。

/sw/bin/fink selfupdate

アップデートの配布の方法を聞いてきますので、rsync を選択します。次にソフトのインストールまたはアップデートを確認するメッセージが表示されます。リターンキーを押して実行します。

The following package will be installed or updated:
 gettext-bin
The following additional package will be installed:
 libgettext8-shlibs
Do you want to continue? [Y/n]

これでFink の基本インストールは終了です。次に結晶構造解析用ソフトをインストールできるように設定を行います。”fink configure” を実行し、以下の表示に従って設定を行ってください。

/sw/bin/fink configure
OK, I'll ask you some questions and update the configuration file in '/sw/etc/fink.conf'.
In what additional directory should Fink look for downloaded tarballs? [] 
Which directory should Fink use to build packages? (If you don't know what this means, it is safe to leave it at its default.) [] 
Fink does not yet support an official set of binary packages for your current distribution.

=> Setting UseBinaryDist to 'false'

The "unstable" tree contains many packages not present in the "stable" 
tree and often has newer versions of those that are present. All package 
updates are tested in "unstable" before being approved for "stable", 
so "unstable" gets new versions and bug-fixes sooner. However, that means 
packages in "unstable" can change rapidly and are occasionally broken 
temporarily. In addition, packages from the "unstable" tree are less 
likely to be available from bindist servers immediately (if at all). 
The "unstable" tree does not appear to be activated in your fink now. 
Do you want to activate it? [y/N] y
New trees have been added. You should run "fink selfupdate-rsync" or 
"fink selfupdate-cvs" in order to download the latest list of packages in the trees.

(1)     Quiet (do not show download statistics)
(2)     Low (do not show tarballs being expanded)
(3)     Medium (will show almost everything)
(4)     High (will show everything)

How verbose should Fink be? [4] 

Proxy/Firewall settings
Enter the URL of the HTTP proxy to use, or 'none' for no proxy. The URL 
should start with http:// and may contain username, password, and/or 
port specifications. Note that this value will be visible to all users on your computer.
Example, http://username:password@hostname:port
Your proxy:  [none] 
Enter the URL of the FTP proxy to use, or 'none' for no proxy. The URL 
should start with http:// and may contain username, password, and/or 
port specifications. Note that this value will be visible to all users on your computer.
Example, http://username:password@hostname:port
Your proxy:  [none] 
Use passive mode FTP transfers (to get through a firewall)? [Y/n] 

Mirror selection
All mirrors are set. Do you want to change them? [y/N] 

Writing updated configuration to '/sw/etc/fink.conf'...


最後に、”fink selfupdate” を実行し、基本パッケージのアップデートを行えば終了です。途中、パッケージのダウンロードに失敗すると以下の表示が出ますが、”4″ を選択すると解決します。

curl: (22) The requested URL returned error: 404
### execution of curl failed, exit code 22
Downloading the file "dpkg-base-files-0.2.tar.gz" failed.

(1)     Give up
(2)     Retry the same mirror
(3)     Retry another mirror
(4)     Retry using next mirror set "Custom (package-defined) servers"

Default answer will be chosen in 120 seconds...
How do you want to proceed? [3] 4

コンピュータによりますが、アップデートに5分から10分かかります。以上で、fink のセットアップは終了です。個々の結晶構造解析ソフトのインストールについては後ほど説明します。

 

最終更新日:2012年11月18日

Thoughts on Mac, Science, Traveling, and Enjoying Life