Fink

P.M.F. - 5. Installing, Using and Maintaining Fink

P.5.1: ¿Cómo puedo averiguar que paquetes apoya Fink?

R.: 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.

P.5.2: Estoy atrás de un firewall, ¿cómo configuro Fink para usar un HTTP proxy?

R.: 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.

P.5.3: ¿Cómo actualizo paquetes disponibles de CVS cuando estoy atrás de un firewall?

R.: The package cvs-proxy can tunnel through HTTP proxies.

If fink is not configured to use your proxy, change the settings using:

fink configure.

P.5.4: ¿Puedo mover Fink a otro lugar después de la instalación?

R.: 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.

P.5.5: Si muevo Fink después de la instalación y proveo un symlink a la ubicación vieja, ¿funcionará?

R.: Maybe. The general expectation is that it should work, but there may be hidden traps somewhere.

P.5.6: ¿Cómo puedo desinstalar todo el Fink?

R.: 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. If you installed XFree86 through Fink (i.e., you installed the xfree86 or xfree86-rootless 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.

P.5.7: El paquete de base de datos en el website enlista paquete xxx, pero apt-get y dselect no saben nada acerca de ese paquete. ¿Quién está mintiendo?

R.: 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.

P.5.8: Existe este paquete en unstable que quiero instalar, pero el comando fink dice "no encuentro el paquete" ('no package found'). ¿Cómo lo puedo instalar?

R.: 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.

For fink-0.26 and later: If you run fink configure one of the questions will ask whether you want to turn the unstable trees on.

To configure Fink to use unstable when you have an earlier version of the fink tool than 0.26, edit /sw/etc/fink.conf, and add unstable/main and unstable/crypto to the Trees: line.

If you use Fink Commander, then there is a Preference to use unstable packages.

None of these options actually download the unstable tree's package descriptions.You'll need to turn on rsync or cvs updating to do this, which is not set up by default on a new Fink installation. The following command sequence will set you up on a new Fink installation:

fink selfupdate

followed by

fink selfupdate-rsync

or

fink selfupdate-cvs

and then

fink index -f
fink scanpackages

Note: There are Fink Commander analogs for everything except fink index -f. You will have to use the command line for that.

If you're already set up with rsync or cvs updating, then the following command sequence (or the Fink Commander analogs) will suffice:

fink selfupdate
fink index
fink scanpackages
	

If you're not sure what your update method is, check fink --version in at a command line and see if that mentions cvs or rsync.

If you don't want to install any more from unstable than your specific package(s) and its (their) dependencies, (and any base packages that got updated) don't use the update-all command until you turn the unstable tree back off.

P.5.9: Do I really need to enable all of unstable just to install one unstable package that I want?

R.: 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.

P.5.10: Estoy cansado de tener que teclear mi contraseña en sudo una y otra vez ¿hay alguna forma de evitar esto?

R.: 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 =(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.

P.5.11: Cuando trato de correr init.csh o init.sh me aparece un error de "Permiso denegado" ("Permission denied"). ¿Qué estoy haciendo mal?

R.: 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

P.5.12: Ayuda! Usé el menú de entrada de "(A)cces" en dselect y ahora ya no puedo bajar paquetes!

R.: 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.

P.5.13: Cuando trato de correr "fink selfupdate" o "fink selfupdate-cvs", me sale el error "Updating using CVS failed. Check the error messages above."."

R.: 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-cvs

If, 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

If you get errors that mention cvs.sourceforge.net:

cvs [update aborted]: connect to cvs.sourceforge.net(66.35.250.207):
2401 failed: Operation timed out

this is because of a restructuring of the CVS servers at sourceforge.net in 2006. Fink files are now at fink.cvs.sourceforge.net.

Check your Distribution version, e.g. via

fink --version

If that shows 10.4-transitional, then you need to update to the regular 10.4 distribution. An update script has been created to assist with that.

P.5.14: Cuando uso Fink, my equipo se congela / se produce un kernel panic / muere. Ayuda!

R.: A number of recent reports on the fink-users mailing list have 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.

P.5.15: Estoy tratando de instalar un paquete, pero Fink no puede bajarlo. El servidor muestra una version mas reciente del paquete que lo que tiene Fink. ¿Qué hago?

R.: 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.

P.5.16: Aparece errores de "command not found" cuando corro Fink o cualquier cosa que haya instalado con Fink.

R.: 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.

P.5.17: Quiero esconder / sw en el Finder para evitar que los usuarios dañen la instalación de Fink.

R.: 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.

P.5.18: No puedo instalar nada, porque me sale el siguiente error: "install-info: unrecognized option `--infodir=/sw/share/info"

R.: 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.

P.5.19: No puedo instalar o remover nada, por un problema con "files list file" ("el archivo de la lista de archivos").

R.: 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.list

e.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.list

What this does is to extract the contents of the .deb file, remove everything but the filenames, and write these to the .list file.

P.5.20: Me aparece un montón de basura cuando selecciono paquetes en dselect. ¿Cómo lo puedo usar?

R.: 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.

P.5.21: No puedo actualizar la versión Fink.

R.: Si ni ejecutar fink selfupdate ni sudo apt-get update ; sudo apt-get dist-upgrade te actualiza a una versión más nueva de Fink, entonces puedes descargar manualmente una versión más nueva del paquete fink. Los comandos a usar son:

  • 10.3.x: (Distribución 0.7.1)
    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: (Distribución 0.6.3)
    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

P.5.22: ¿Puedo colocar a Fink en un volumen o directorio con un espacio en su nombre?

R.: We recommend against putting your Fink directory tree inside a directory with spaces in its name. It's just not worth the hassle.

P.5.23: Cuando trato de hacer una actualización binaria, aparecen muchos mensajes con "File not found" ("archivo no encontrado").

R.: 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 
Hit http://us.dl.sourceforge.net 10.3/release/main Packages 
Hit http://us.dl.sourceforge.net 10.3/release/main Release 
Hit http://us.dl.sourceforge.net 10.3/release/crypto Packages 
Hit http://us.dl.sourceforge.net 10.3/release/crypto Release 
Hit http://us.dl.sourceforge.net 10.3/current/main Packages 
Hit http://us.dl.sourceforge.net 10.3/current/main Release 
Hit http://us.dl.sourceforge.net 10.3/current/crypto Packages 
Hit http://us.dl.sourceforge.net 10.3/current/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.

P.5.24: Cambie mi sistema OS y las herramientas de desarrollo, pero Fink no reconoce el cambio.

R.: 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.

P.5.25: Me salen errores con las aplicaciones de gzip - dpkg-deb del paquete de fileutils! Ayuda!

R.: 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

P.5.26: Cuando abro una ventana terminal, me sale un mensaje que dice "Your environment seems to be correctly set up for Fink already." y se desconecta.

R.: 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.

P.5.27: Tengo a Fink instalado afuera de la partición principal y no puedo actualizar el paquete Fink desde la fuente. Hay errores involucrando chowname.

R.: 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.

P.5.28: Fink won't update my packages because it says it can't find the 'gnu' mirror.

R.: 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

P.5.29: I can't update Fink, because it can't move /sw/fink out of the way.

R.: 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

P.5.30: I get a message that says "No fonts found".

R.: 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

P.5.31: I can't install Fink via the Installer package, because I get "volume doesn't support symlinks" errors.

R.: 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. If that doesn't work, then you may need to set your permissions manually via:

sudo chmod 1775 /	  
	

P.5.32: I can't update Fink, because package architecture (darwin-i386) does not match system (darwin-powerpc).

R.: 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.

Siguiente: 6. Compile Problems - General