F.A.Q. - 5. Installing, Using and Maintaining Fink
Q5.1: How can I find out what packages Fink supports?
A: Since Fink 0.2.3, there is the list command. It produces a list of all packages known to your Fink installation. Example:
fink list
If you're using the binary distribution, dselect gives you a nice browsable listing of available packages. Note that you must run it as root if you want to select and install packages from within dselect.
There's also the package database at the website.
Q5.2: I'm behind a firewall. How do I configure Fink to use an HTTP proxy?
A: The fink command supports explicit proxy settings that are passed on to wget/curl. If you were not asked for proxies on first time installation, you can run fink configure to set it up. You can also run that command at any time to reconfigure the fink command. If you followed the instructions in the installation guide, and use /sw/bin/init.csh (or /sw/bin/init.sh), then apt-get and dselect also will use these proxy settings. Make sure that you put the protocol in front of the proxy, e.g.
ftp://proxy.yoursite.somewhere
If you are still having problems, go into System Preferences, select the Network pane, select the Proxies tab, and make sure that the box labeled "Use Passive FTP Mode (PASV)" is checked.
Q5.3: How do I update available packages from CVS when I am behind a firewall?
A: The package cvs-proxy can tunnel through HTTP proxies.
-
Install the cvs-proxy package with the command:
fink --use-binary-dist install cvs-proxy -
Switch to the CVS update method with the command:
fink selfupdate-cvs
If fink is not configured to use your proxy, change the settings using:
fink configure.
Q5.4: Can I move Fink to another location after installation?
A: No. Well, of course you can move the files using mv or the Finder, but 99% of the programs will stop working when you do. That's because basically all Unix software depends on hardcoded paths to find data files, libraries and other stuff.
Q5.5: If I move Fink after installation and provide a symlink from the old location, will it work?
A: Maybe. The general expectation is that it should work, but there may be hidden traps somewhere.
Q5.6: How can I uninstall all of Fink?
A: Almost all files installed by Fink are in /sw (or wherever you chose to install it). Thus in order to get rid of Fink, enter this command:
sudo rm -rf /sw
The only exception to this rule is XFree86 or X.org. If you installed
an X server through Fink (i.e., you installed the xfree86,
xfree86-rootless, or xorg packages, instead of using
system-xfree86) and want to remove it, you will need
additionally to enter this:
sudo rm -rf /usr/X11R6 /etc/X11 /Applications/XDarwin.app
If you aren't planning to reinstall Fink you also will want to
remove the "source /sw/bin/init.csh" line you added to
your .cshrc file or the "source
/sw/bin/init.sh" line you added to your
.bashrc file, whichever is appropriate to your
setup, using a text editor.
Q5.7: The package database at the website lists package xxx, but apt-get and dselect know nothing about it. Who's lying?
A: Both are correct. The package database knows
about every package, including those that are still in the unstable
section. The dselect and apt-get tools on
the other hand only know about the packages available as precompiled
binary packages. Many packages are not available in precompiled form
through these tools for a variety of reasons. A package must be in the
"stable" section of the latest point release to be considered, and it
must pass additional checks for policy compliance as well as licensing
and patent restrictions.
If you want to install a package that is not available via
dselect / apt-get, you have to compile it
from source using fink install packagename
.
Make sure you have the Developer Tools installed before you try this.
(If there is no installer for the Developer Tools in your
/Applications folder, you can get them from the Apple Developer Connection
after free registration.) See also the question about unstable
below.
Q5.8: There's this package in unstable that I want to install, but the fink command just says 'no package found'. How can I install it?
A: First make sure you understand what 'unstable' means. Packages in the unstable tree are not in stable for any number of reasons. It could be because there are known issues, validation errors, or just not enough people giving feedback that the package works for them. For that reason, Fink doesn't search the unstable tree by default.
If you do enable unstable, please remember to e-mail the
maintainer if something works (or even if it doesn't). Feedback from
users like you is what we use to determine if something is ready for
stable! To find out the maintainer of a package, run fink info
packagename.
New in fink-0.26: If you run fink configure one of the questions will ask whether you want to turn the unstable trees on. You will need to run fink selfupdate; fink index; fink scanpackages afterward. Note: you must have either rsync or cvs updating turned on to get new package descriptions.
To configure Fink to use unstable when you have an earlier version of the fink tool than 0.26, edit
/sw/etc/fink.conf, add unstable/main
and unstable/crypto to the Trees: line, and
then run fink selfupdate; fink index; fink scanpackages. Rsync or cvs updating is required as above.
Also note, if you don't want to install any more from unstable than
your specific package(s) and its (their) dependencies, don't use the
update-all command until you turn the unstable tree
back off.
Q5.9: Do I really need to enable all of unstable just to install one unstable package that I want?
A: No, but it is highly recommended you do. Mixing and matching can cause unforeseen issues that make it difficult to debug problems when they do arise.
That said, if you only want one or two specific packages, and nothing
else from unstable, then you need to switch over to CVS updating (i.e.
use fink selfupdate-cvs), because rsync only updates the
trees that are active in your fink.conf. Edit
/sw/etc/fink.conf and add local/main
to the Trees: line, if not present. Then you'll need to
run fink selfupdate to download the package description
files. Now copy the relevant .info files (and their
associated .patch files, if there are any) from
/sw/fink/dists/unstable/main/finkinfo (or
/sw/fink/dists/unstable/crypto/finkinfo) to
/sw/fink/dists/local/main/finkinfo. However, note
that your package may depend on other packages (or particular
versions) which are also only in unstable. You will have to move their
.info and .patch files as well. After you
move all of the files, make sure to run fink index, so
that Fink's record of available packages is updated. Once you're done
you can switch back to rsync (fink selfupdate-rsync) if
you want.
Q5.10: I'm tired of typing my password into sudo again and again. Is there a way around this?
A: If you're not paranoid, you can configure sudo to not ask you for a
password. To do this, run visudo as root and add a line like this:
username ALL = NOPASSWD: ALL
Replace username with your actual username, of course.
This line allows you to run any command via sudo without typing your
password.
Q5.11: When I try to run init.csh or init.sh, I get a "Permission denied" error. What am I doing wrong?
A: init.csh and init.sh are not supposed to be run like normal
commands. These files set environment variables like PATH and MANPATH
in your shell. To have a lasting effect on the shell, it must be
processed with the source command for csh/tcsh, or with
the . command for bash/zsh, like this:
for csh/tcsh:
source /sw/bin/init.csh
for bash/zsh:
. /sw/bin/init.sh
Q5.12: Help! I used the "[A]ccess" menu entry in dselect and now I can't download packages any more!
A: You probably pointed apt at a Debian mirror, which of course
doesn't have the Fink files. You can fix this manually or through
dselect. To fix it manually, edit the file
/sw/etc/apt/sources.list in a text editor as root. Remove
lines that mention debian.org and replace them with these:
deb http://us.dl.sourceforge.net/fink/direct_download release main crypto deb http://us.dl.sourceforge.net/fink/direct_download current main crypto
(Or if you live in Europe, you can use
eu.dl.sourceforge.net instead of
us.dl.sourceforge.net)
To fix it through dselect, run "[A]ccess" again, choose the "apt" method and enter the following info:
URL: http://us.dl.sourceforge.net/fink/direct_download - Distribution: release - Components: main crypto
Then, say you want to add another source and repeat the process with "current" instead of "release".
A fixed version of the apt package (which provides the configuration script as a plug-in for dselect) is making it's way through CVS now.
Q5.13: When I try to run fink selfupdate
or "fink
selfupdate-cvs", I get the error "Updating using CVS failed.
Check the error messages above."
A: If the message is
Can't exec "cvs": No such file or directory at /sw/lib/perl5/Fink/Services.pm line 216, <STDIN> line 3. ### execution of cvs failed, exit code -1
then you need to install the Developer Tools.
If, on the other hand, the last line is
### execution of su failed, exit code 1
you'll need to look further back in the output to see the error. If you see a message that your connection was refused:
(Logging in to anonymous@fink.cvs.sourceforge.net) CVS password: cvs [login aborted]: connect to fink.cvs.sourceforge.net:2401 failed: Connection refused ### execution of su failed, exit code 1 Failed: Logging into the CVS server for anonymous read-only access failed.
or a message like the following:
cvs [update aborted]: recv() from server fink.cvs.sourceforge.net: Connection reset by peer ### execution of su failed, exit code 1 Failed: Updating using CVS failed. Check the error messages above.
or
cvs [update aborted]: End of file received from server
or
cvs [update aborted]: received broken pipe signal
then it's likely that the cvs servers are overloaded and you have to try the update later.
Another possibility is that you have some bad permissions in your CVS directories, in which case you get "Permission denied" messages:
cvs update: in directory 10.2/stable/main: cvs update: cannot open CVS/Entries for reading: No such file or directory cvs server: Updating 10.2/stable/main cvs update: cannot write 10.2/stable/main/.cvsignore: Permission denied cvs [update aborted]: cannot make directory 10.2/stable/main/finkinfo: No such file or directory ### execution of su failed, exit code 1 Failed: Updating using CVS failed. Check the error messages above.
In this case you need to reset your cvs directories. Use the command:
sudo find /sw/fink -type d -name 'CVS' -exec rm -rf {}\
; fink selfupdate-cvsIf, you don't see either of the above messages, then this almost always means you've modified a file in your /sw/fink/dists tree and now the maintainer has changed it. Look further back in the selfupdate-cvs output for lines that start with "C", like so:
C 10.2/unstable/main/finkinfo/libs/db31-3.1.17-6.info ... (other info and patch files) ... ### execution of su failed, exit code 1 Failed: Updating using CVS failed. Check the error messages above.
The "C" means CVS had a conflict in trying to update the latest version. The fix is to delete any files that show up as starting with "C" in the output of selfupdate-cvs, and try again:
sudo rm /sw/fink/10.2/unstable/main/finkinfo/libs/db31-3.1.17-6.info fink selfupdate-cvs
Q5.14: When I use Fink, my whole machine freezes up/kernel panics/dies. Help!
A: A number of reports in fall, 2002 on the fink-users mailing list indicated problems (including kernel panics and infinite hangs during patching) when using Fink to compile packages while anti-virus software is installed. You may need to switch off any anti-virus software before using Fink.
Q5.15: I'm trying to install a package, but Fink can't download it. The download site shows a later version number of the package than what Fink has. What do I do?
A: The package sources get moved around by the upstream sites when new versions are released.
The first thing you should do is run fink selfupdate.
It may be that the package maintainer has already fixed this, and you
will get an updated package description with either a more recent
version or a revised download URL.
If this doesn't work, most sources are available on http://distfiles.master.finkmirrors.net/
(thanks to Rob Braun) , and you can run fink configure to
choose to search "Master" source mirrors so that Fink will
automatically look there.
If this doesn't work, please let the package maintainer (available
from "fink describe packagename
") know that the
URL is broken; not all maintainers read the mailing lists all of the
time.
To get a usable source, first try hunting around the remote site in other directories for the same version of the source that Fink wants (e.g. in an "old" directory). Keep in mind, though, that some remote sites like to trash the old versions of their packages. If the official site doesn't have it, then try a web search--sometimes there are unofficial sites that have the tarball you want. Another place to look is http://us.dl.sourceforge.net/fink/direct_download/source/, which is where Fink stores sourcefiles from packages that have been released in binary form. If all of the above fail, then you might consider posting on the fink-users mailing list to ask if anybody has the old source available to give you.
Once you locate the proper source tarball, download it manually,
and then move the file into your Fink source location (i.e. for a
default Fink install, "sudo mv package-source.tar.gz
/sw/src/". Then use 'fink install packagename
' as normal.
If you can't get the source file, then you'll have to wait for the maintainer to deal with the problem. They may either post a link to the old source, or update the .info and .patch files to use the newer version.
Q5.16: I get "command not found" errors when I run Fink or anything that I installed with Fink.
A: If this always happens, then you may have inadvertently
modified (or failed to modify) your startup scripts. Run the
/sw/bin/pathsetup.sh script in a terminal
window. This program will attempt to detect your default shell
and add a command to load Fink's shell initialization script
into your shell's configuration. You'll then need to open a
new terminal session so that your environment settings are
loaded. Note: Some older versions fink called this
script pathsetup.command instead
of pathsetup.sh. Alternately, you can run
the pathsetup.app application on the Fink
binary distribution disk image.
On the other hand, if you only have problems in the Apple X11 terminal, the easy solution is to modify the "Terminal" entry in the X11 Application menu via the Applications->Customize Menu... option. Instead of just
xterm
change the command field to read
xterm -ls
ls here means login shell
, and the result is that your full login setup gets used (just like the OS X Terminal).
These /sw/bin/init.* scripts do much
more than just add /sw/bin to your PATH.
Many packages will not work correctly without these additional
actions.
Q5.17: I want to hide /sw in the Finder to keep users from damaging the Fink setup.
A: You can indeed do this. If you have the Development Tools installed, then you can run the following command:
sudo /Developer/Tools/SetFile -a V /sw
This makes /sw invisible, just like the standard system folders (/usr, etc.). If you don't have the Developer Tools, there are various third-party applications that let you manipulate file attributes--you need to set /sw to be invisible.
Q5.18: I can't install anything, because I get the following error: "install-info: unrecognized option `--infodir=/sw/share/info'"
A: This usually is due to a problem in your PATH. In a terminal window type:
printenv PATH
If /sw/sbin doesn't appear at all, then you
need to set your environment up as per the instructions
in the Users Guide. If /sw/sbin is there, but
there are other directories ahead of it (e.g.
/usr/local/bin), then you will either want to
reorder your PATH so that /sw/sbin is near the
beginning. Or if you really need the other directory to be before
/sw/sbin, and this former directory includes another install-info directory, then you'll want to temporarily rename this install-info subdirectory when you use Fink.
Q5.19: I can't install or remove anything, because of a problem with a "files list file".
A: Typically these errors take the form:
files list file for package packagename contains empty filename
or
files list file for package packagename is missing final newline
This can be fixed, with a little work. If you have the .deb file for the offending package currently available on your system, then check its integrity by running
dpkg --contents full-path-to-debfile
e.g.
dpkg --contents /sw/fink/debs/libgnomeui2-dev_2.0.6-2_darwin-powerpc.deb
If you get back a listing of directories and files, then your .deb is OK. If the output is something other than directories and files, or if you don't have the .deb file, you can still proceed because the error doesn't interfere with builds.
If you have been installing from the binary distribution or you
know for sure that the version in the binary distribution is the same
as what you have installed (e.g. by checking the package
database), then you can get a .deb file by running sudo
apt=get install --reinstall --download-only packagename
. Otherwise you can build one yourself by running fink
rebuild packagename
, but it won't install yet.
Once you have a valid .deb file, then you can reconstitute the
file. First become root by using sudo -s (enter your
administrative user password if necessary), and then use the following
command:
dpkg -c full-path-to-debfile | awk '{if ($6 == "./"){ print "/."; } \
else if (substr($6, length($6), 1) == "/")\
{print substr($6, 2, length($6) - 2); } \
else { print substr($6, 2, length($6) - 1);}}'\
> /sw/var/lib/dpkg/info/packagename.liste.g.
dpkg -c /sw/fink/debs/libgnomeui2-dev_2.0.6-2_darwin-powerpc.deb | awk \
'{if ($6 == "./") { print "/."; } \
else if (substr($6, length($6), 1) == "/") \
{print substr($6, 2, length($6) - 2); } \
else { print substr($6, 2, length($6) - 1);}}' \
> /sw/var/lib/dpkg/info/libgnomeui2-dev.listWhat this does is to extract the contents of the .deb file, remove everything but the filenames, and write these to the .list file.
Q5.20: I get a bunch of garbage when I select packages in
dselect. How can I use it?
A: There are issues between dselect and
Terminal.app. A workaround is to enter the
following command
tcsh users:
setenv TERM xterm-color
bash users:
export TERM=xterm-color
before you run dselect. You may want to put
this in your startup file (e.g. .cshrc |
.profile) so that it gets run all of the time.
Q5.21: Why do I get a bunch of "dyld: perl undefined symbols" errors when I run Fink commands?
A: Obsolete
If you see an error sequence like the following:
dyld: perl Undefined symbols: _Perl_safefree _Perl_safemalloc _Perl_saferealloc _Perl_sv_2pv _perl_call_sv _perl_eval_sv _perl_get_sv
then what has probably happened is that you updated Perl to a new
version and now storable-pm needs to be updated.
You should update Fink. During the process you will be prompted to
install either perl-core or
system-perl; choose the latter. In addition,
storable-pm should also get updated.
For OS 10.1.x, perform the following commands (you'll need the Developer Tools):
sudo mv /sw/lib/perl5/darwin/Storable.pm /tmp sudo mv /sw/lib/perl5/darwin/auto/Storable /tmp fink rebuild storable-pm fink selfupdate-cvs
Q5.22: I can't seem to update Fink's version.
A: If neither running fink selfupdate nor sudo apt-get update ; sudo apt-get dist-upgrade updates you to a newer Fink release, then you may need to download a newer version of the fink package manually. The relevant commands are:
- 10.3.x: (0.7.1 distribution)
curl -O http://us.dl.sf.net/fink/direct_download/dists/fink-0.7.1-updates/main/binary-darwin-powerpc/base/fink_0.22.4-1_darwin-powerpc.deb sudo dpkg -i fink_0.22.4-1_darwin-powerpc.deb rm fink_0.22.4-1_darwin-powerpc.deb fink selfupdate
- 10.2.x: (0.6.3 distribution)
curl -O http://us.dl.sf.net/fink/direct_download/dists/fink-0.6.3/release/main/binary-darwin-powerpc/base/fink_0.18.3-1_darwin-powerpc.deb sudo dpkg -i fink_0.18.3-1_darwin-powerpc.deb rm fink_0.18.3-1_darwin-powerpc.deb fink selfupdate
Q5.23: Can I put Fink in a volume or directory with a space in its name?
A: We recommend against putting your Fink directory tree inside a directory with spaces in its name. It's just not worth the hassle.
Q5.24: When I try to do a binary update, there are many messages with "File not found" or "Couldn't stat package source list file".
A: If you see something like the following:
Err file: local/main Packages File not found Ign file: local/main Release Err file: stable/main Packages File not found Ign file: stable/main Release Err file: stable/crypto Packages File not found Ign file: stable/crypto Release ... Failed to fetch file:/sw/fink/dists/local/main/binary-darwin-powerpc/Packages File not found Failed to fetch file:/sw/fink/dists/stable/main/binary-darwin-powerpc/Packages File not found Failed to fetch file:/sw/fink/dists/stable/crypto/binary-darwin-powerpc/Packages File not found Reading Package Lists... Done Building Dependency Tree...Done E: Some index files failed to download, they have been ignored, or old ones used instead. update available list script returned error exit status 1.
then all you need to do is run fink scanpackages. This
generates the files that aren't being found.
If you get an error of the following form:
W: Couldn't stat source package list file: unstable/main Packages (/sw/var/lib/apt/lists/_sw_fink_dists_unstable_main_binary-darwin- powerpc_Packages) - stat (2 No such file or directory)
then you should run
sudo apt-get update fink scanpackages
to fix it.
Q5.25: I've changed my OS | Developer Tools, but Fink doesn't recognize the change.
A: When changing the Fink distribution (of which the source and binary distros are subsets), Fink needs to be told that this has happened. To do this, you can run a script that normally gets run when you first install Fink:
/sw/lib/fink/postinstall.pl
Doing this will point Fink to the correct place.
Q5.26: I get errors with gzip | dpkg-debI
applications from the fileutils package! Help!
A: Errors of the form:
gzip -dc /sw/src/dpkg-1.10.9.tar.gz | /sw/bin/tar -xf - ### execution of gzip failed, exit code 139
or
gzip -dc /sw/src/aquaterm-0.3.0a.tar.gz | /sw/bin/tar -xf - gzip: stdout: Broken pipe ### execution of gzip failed, exit code 138
or
dpkg-deb -b root-base-files-1.9.0-1 /sw/fink/dists/unstable/main/binary-darwin-powerpc/base ### execution of dpkg-deb failed, exit code 1 Failed: can't create package base-files_1.9.0-1_darwin-powerpc.deb
or segmentation faults when running utilities from
fileutils, e.g. ls or mv, are likely
to be due to a prebinding error in a library, and can be fixed by
running
sudo /sw/var/lib/fink/prebound/update-package-prebinding.pl -f
Q5.27: When I open a Terminal window, I get a message that "Your environment seems to be correctly set up for Fink already.", and it logs out.
A: What happened is that somehow the OSX Terminal program has been
told to run /sw/bin/pathsetup.command every time you log
in. You can fix this by removing the Preferences file,
~/Library/Preferences/com.apple.Terminal.plist.
If you have other preferences that you want to keep, you can edit
the file with a text editor and remove the reference to
/sw/bin/pathsetup.command.
Q5.28: I have Fink installed away from the main partition and I can't update the fink package from source. There are errors involving chowname
.
A: If your error looks like:
This first test is designed to die, so please ignore the error message on the next line. # Looks like your test died before it could output anything. ./00compile............................ok ./Base/initialize......................ok ./Base/param...........................ok ./Base/param_boolean...................ok ./Command/cat..........................ok ./Command/chowname.....................# Failed test (./Command/chowname.t at line 27) # got: 'root' # expected: 'nobody'
then you need to run Get Info on the drive/partition where Fink is installed and unselect the "Ignore ownership" button.
Q5.29: Fink won't update my packages because it says it can't find the 'gnu' mirror.
A: If you get an error that ends with
Failed: No mirror site list file found for mirror 'gnu'.
then most likely you need to update the fink-mirrors package, e.g. via:
fink install fink-mirrors
Q5.30: I can't update Fink, because it can't move /sw/fink out of the way.
A: This error:
Failed: Can't move "/sw/fink" out of the way.
is usually due, in spite of what it says, to permissions errors in one of the temporary directories that get created during a selfupdate. Remove these:
sudo rm -rf /sw/fink.tmp /sw/fink.old
Q5.31: I keep getting 403 errors when I use apt-get or dselect or the Fink Commander Binary menu.
A: There have been problems with the Sourceforge download servers, and therefore we are moving the binary distribution repository for this very reason.
- If you have the Developer Tools installed then install the latest version of the
fink-mirrorspackage (>= 0.24.4.1), and then reinstallfink, either via:fink reinstall fink
or
sudo apt-get install --reinstall fink
(if for whatever reason you don't want to use the source distribution).
- If you don't have the Developer Tools installed, then you'll have to set things up manually. Edit your
sources.listfile as root, e.g..viasudo pico /sw/etc/apt/sources.list
(use your favorite Unix-line-ending-compatible text editor). Change the lines that start with "Official binary distribution:" thusly:
# Official binary distribution: download location for packages # from the latest release deb http://bindist.finkmirrors.net/bindist 10.3/release main crypto # Official binary distribution: download location for updated # packages built between releases deb http://bindist.finkmirrors.net/bindist 10.3/current main crypto
The above of course assumes you're on 10.3. If you're on a different OS replace
10.3with what your current distribution is.Then save your work and quit the editor. Now update your binary package list again.
Q5.32: I get a message that says "No fonts found".
A: If you see the following (so far only seen on OS 10.4):
No fonts found; this probably means that the fontconfig library is not correctly configured. You may need to edit the fonts.conf configuration file. More information about fontconfig can be found in the fontconfig(3) manual page and on http://fontconfig.org.
then you can fix it by running
sudo fc-cache
Q5.33: I can't install Fink via the Installer package, because I get "volume doesn't support symlinks" errors.
A: This message commonly means that you've tried to run the Fink installer as user who doesn't have administrative privileges. Make sure to log in at the login screen as such a user or switch to such a user in the Finder (i.e. fast user switching) before starting the Fink installer.
If you're having trouble even when using an admin account, then it's likely a problem with the permissions on your top-level directory. Use Apple's Disk Utility (from the Utilities sub-folder in your Applications folder), select the hard drive in question, choose the First Aid tab, and press Repair Disk Permissions.
Q5.34: I can't update Fink, because package architecture (darwin-i386) does not match system (darwin-powerpc).
A: This error occurs if you use a PowerPC installer package on an Intel machine. You'll need to flush your Fink installation, e.g.:
sudo rm -rf /sw
and then download the disk image for Intel machines from the downloads page.
Q5.35: I haven't been able to do a cvs selfupdate.
A: If you get errors that include lines like:
cvs [update aborted]: connect to cvs.sourceforge.net(66.35.250.207): 2401 failed: Operation timed out
this is because of a recent restructuring of the CVS servers at sourceforge.net. Fink files are now at fink.cvs.sourceforge.net. You'll need to update the fink-mirrors package via the binary tools:
sudo apt-get update ; sudo apt-get install fink-mirrors