Your Ad Here

Install and Configure Fink from Binary or Source [Mac Guide]

Fink Mac OS XFink is a package manager that makes it easy to install Unix Open Source software on your Mac. Anyone who has tried to install/compile Open Source software on a system based on Unix or Linux will understand how heavenly these package managers can be. Keep reading to learn how to easily and quickly install Fink on your Mac, or if it’s currently installed, updating to the newest release. Feel free to jump ahead, or start from the beginning for a clean install:

Leopard Update

The only way I’ve found to update Fink on Leopard and avoid having to start from scratch is to update to the newest source release on Tiger before copying your /sw directory to Leopard. If you have the binary of Fink installed on Tiger, go to Step 3: Updating from Binary to Source. Otherwise, go to Step 3: Updating Binary or Source. After updating Fink on Tiger, install Leopard and copy your /sw directory from Tiger to Leopard. Before continuing, make sure you have XCode 3.0 installed, or this next step won’t work. Once it’s installed, open up a terminal and type

sudo fink reinstall fink

That’s it!

I was lucky enough to have made a bootable copy of my Tiger setup before installing Leopard. My condolences for those of you who don’t have a bootable copy of Tiger and already switched to Leopard. If someone out there knows how to update Fink without starting from scratch in this case, please leave a comment!

Step 1. Downloading Fink - Source or Binary?

Your first choice is to choose whether you want to download the binary or source version of Fink. As far as I’m concerned, it’s best to download and install the source version. The biggest reason for this is for a lot of packages, the most updated version is only available in source. In fact, this is true of Fink itself! To see this, you can go to the online package database, type fink in the search field, click on fink from the resulting list, and you’ll arrive at the following:

Package Fink

Okay, so the binary version is an earlier release than the source. So what? I ran into this problem myself, and apparently it is a Frequently Asked Question, but I wanted some software that had a dependancy with a specific version. I checked whether Fink had it, and it did, but not the newest version that I needed. The solution is basically to update your Fink package manager, but I couldn’t go beyond the binary version that I had installed! So I had to switch to source (see how to do this in Step 3 below). Once I did, the version I needed magically appeared. So the point is: the source version of Fink keeps you completely up to date on all packages (including Fink).

Step 2. Installing Fink

The next two sections are very similar to Fink’s Quick Start page

Installing the Binary

Go to the fink website and download the binary package appropriate for your version of OS X (You can also go directly to the sourceforge site). Making sure you are logged into an account with administrator privileges, double click the dmg file and follow the instructions. It will ask you at some point to modify your path in whatever shell you’re using. Go ahead and let it. This is so all of the Fink binaries and libraries that are installed can be found from within Terminal.

Installing from Source

The first thing to do is download and install XCode Tools/Developer Tools. Download the most updated version at the Apple Developer Connection. Keep in mind that you’ll want the version appropriate for your OS, as listed in the following table:

10.2 December 2002 Developer Tools
August 2003 gcc3.3 updater
10.3 XCode 1.5
November 2004 gcc3.3 updater
10.4 (PowerPC) XCode 2.4.1
XCode Legacy Tools
10.4 (Intel) XCode 2.4.1
10.5 (Leopard) XCode 3.0

Now go to the fink website and download the source distribution. From within Terminal, go to the directory where Fink was downloaded and type

tar xvzf fink-0.27.6.tar.gz
cd fink-0.27.6
./bootstrap

Fink will then ask you a series of questions. All of the defaults can be chosen by simply pressing enter, except for one. Fink will ask you if you want to install unstable packages. I recommend you choose Yes here. A lot of times the most up-to-date version of software is only available as an unstable package, and there are many packages that are only available as unstable distributions. I have currently never had a problem or bug with an unstable package. The term unstable is unfortunately a little overly dramatic.

That should be it. The script will download everything for you, compile and then install things in the appropriate place.

Step 3. Updating Fink

Once you’ve got Fink installed, it’s important to update to the newest release. Again, this is so you can be fully up to date on the packages that are available for download.

Updating Binary or Source

Whether you have the binary or the source version, updating Fink is easy. Simply type

sudo fink selfupdate

and Fink will update itself with the corresponding binary or source version. Once this is complete, you may want to update all of the installed packages as well:

sudo fink update-all

This will download and install all binary packages, as well as downloading and compiling the source code for the installed source packages. There is a high probability that you may run into a little snag here (see Frequently Asked Question Q7.7 involving gettext). You may get the following output from Fink:

Fink isn’t sure how to install the above packages safely. You may be able to fix things by running:
fink scanpackages
sudo apt-get update
sudo apt-get install gettext=0.10.40-25

Follow Fink’s instructions and rerun update-all

sudo fink update-all

This fixed things quickly for me and all was well. At this point Fink and all packages are updated to their newest releases!

Updating from Binary to Source

The above section covers going from binary/source to the newest binary/source release. What if you have the binary and want to update to the source release?
I had trouble figuring this out myself. I needed a newer package manager so that I could download software that wasn’t available even in the newest binary release. First, if you eventually want to include unstable packages, this is a good time to do it. Since you have the binary version installed, you will need to manually edit your Fink configuration file (in newer (i.e. source) versions of Fink, all you need to do is type sudo fink configure). The configuration file is located at /sw/etc/fink.conf. Open it with your favorite editor (I’m a vi fan myself. Make sure you use sudo!). Here’s what your configuration file might look like:

# Fink configuration, initially created by bootstrap.pl
Basepath: /sw
RootMethod: sudo
Trees: local/main stable/main stable/crypto
Distribution: 10.4
ConfFileCompatVersion: 1
Mirror-apache: http://www.apache.org/dist
Mirror-apt: http://bindist.finkmirrors.net/bindist
Mirror-cpan: ftp://ftp.cpan.org/pub/CPAN
Mirror-ctan: ftp://tug.ctan.org/tex-archive
Mirror-debian: ftp://ftp.debian.org/debian
Mirror-gimp: ftp://ftp.gimp.org/pub/gimp
Mirror-gnome: ftp://ftp.gnome.org/pub/GNOME
Mirror-gnu: ftp://ftp.gnu.org/gnu
Mirror-kde: ftp://ftp.kde.org/pub/kde
Mirror-master: http://distfiles.master.finkmirrors.net/
Mirror-rsync: rsync://master.us.finkmirrors.net/finkinfo/
Mirror-sourceforge: http://west.dl.sourceforge.net/sourceforge/
MirrorContinent: nam
MirrorCountry: nam-us
MirrorOrder: MasterFirst
ProxyPassiveFTP: true
UseBinaryDist: true
Verbose: 1
SelfUpdateMethod: rsync

Simply change the line

Trees: local/main stable/main stable/crypto

to

Trees: local/main stable/main stable/crypto unstable/main unstable/crypto

Now, here’s the important part. To update fink from binary to source, type

sudo fink ––no-use-binary-dist selfupdate

then continue as in the previous section.

Step 4. Installing packages

To get you started installing packages, there are two main commands to use: fink list and fink install. To get a list of all available packages for installation, type

fink list

You can narrow down the list with an optional name filter. For example, if I want to see packages with ssh in the name, I type

fink list ssh

and I get the following packages (with their versions and descriptions removed):

autossh
ccvssh
kdessh
libssh2
libssh2-shlibs
openssh
openssh-hpn
scanssh
sshfs
webmin-sshd
x11-ssh-ask…

Finally, let’s say you want to install sshfs. Simply type

sudo fink install sshfs

and that’s it! Enjoy using Fink, and stay tuned for future posts on some Fink tips and tricks.




Viewing 9 Comments

    • ^
    • v
    Thank you so much but i installed fink in my system. I want to install scilab-5.0.3 which is not present in fink packages but find it on fink website which gives me only fink-4.1.2.
    so can i download it from other website. and If i can how to make as a fink package..................

    Thank you
    • ^
    • v
    poushag,
    Thanks for the reminder. Forgot to mention that (critical!) step. I actually installed XCode-3.0 awhile back when I initially attempted a Fink upgrade. The omission has been included.

    When it comes to operating system upgrades, I'm kind of a junky. Of course, I'm also a freeware junky. You're right about that, though: the price is definitely right when it comes to freeware.
    • ^
    • v
    Steve,
    Glad to hear it was easy for you to keep your Fink install and upgrade to Leopard. Although I think that if you had XCode-3.0 already installed before doing the fink reinstall under Leopard that you should note that above. If you didn't install XCode-3.0 you may have some problems. (I cannot imagine how building Fink from source on Leopard could work if you don't have XCode-3.0 installed. In other words, when the Fink source versions increment up again, will you be able to update to the latest in your selected tree - i.e. stable?)

    I have not taken the plunge into Leopard yet. I am concerned that my DNSUpdate software and Flying Buttress firewall software which help me keep my webserver (and other things) online and secured have not been upgraded to have complete Leopard compatibility. I run regular old OS X on my system so I don't have all the nice GUI goodies Apple provides for managing their OS X Server product. So I make do with freeware and shareware and as a result I don't expect to be an early adopter of major OS upgrades. But the price is right.
    • ^
    • v
    @poushag - Hey, poushag. Just wanted to let you know I finally updated Fink for Leopard on my machine and added a section in the Fink post talking about it. Have you upgraded to Leopard yet? If so, did you find a different way to make Fink work on Leopard without a clean install?
    • ^
    • v
    Sorry for the delayed response, poushag. I see what you mean. I've looked a bit into updating Fink without starting completely over, but I've run into lots of difficulties. For now, I think I'm just going to start over, but still play with my old setup and try to get it working without a clean install.

    I had been using rsync as my updating method, but when I try and update after Leopard I get "Failed: Sorry, fink doesn't support rsync updating in the 10.5 distribution at present." CVS doesn't work either.

    If you or anyone else has figured out how to make for a smoother transition, please let us all know! Thanks again for your comment, poushag.
    • ^
    • v
    Steve, I guess I should have defined what I meant by 'upgrade'. I meant detailed upgrade instructions to navigate the path for going from the latest supported Fink under Tiger to the latest supported Fink under Leopard (without blowing it away and starting over).

    This appears much more complex than either doing a fresh install of Fink (under any supported OSX version) or doing updates (as you described above with those commands containing 'selfupdate' and 'update-all'). I haven't upgraded to Leopard yet so I have no clue about how to make the Fink transition. (And I have read the Fink webpages but they are just too sparse for somebody who uses Fink about once a year.)

    You didn't mention whether or not you upgraded Fink yet after upgrading to Leopard. Whether it has been done or has yet to happen, it would be helpful to document here whatever process is used and the results obtained.
    • ^
    • v
    Thanks, poushag. I definitely plan on updating the article to include Leopard info (I just switched to Leopard last week). Also including FinkCommander is a good idea as well. I started using it, but then got attached to the command line awhile ago. As for upgrading the binary and source distributions, if I understand you correctly, I've included a how-to in the current article's section "Updating Fink." If you are asking in regards to Leopard, I'll put that in a future post. If you have any tips or tricks yourself, feel free to include them in a comment.
    • ^
    • v
    Steve, This is the best writeup about Fink I have seen. I think a great follow up would be for you to edit this article to bring it up to date for using fink under Leopard. And especially helpful would be an additional detailed section explaining how-to upgrade both the Fink binary distribution and Fink source distribution.

    PS - FinkCommander is pretty handy too and would be worth your time to try (and write about) as well.
    • ^
    • v
    l know is late but l install the gimp but l dont know what to do next where the application please help BTW nice web site
 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus

© Copyright Zaphu 2007. All rights reserved. -- Valid XHTML

Sitemap XML Sitemap XHTML