Chapter 6 User Applications

6.1. So, where are all the user applications?
6.2. Where do I find libc.so.3.0?
6.3. Why do I get a message reading ``Error: can't find libc.so.4.0''?
6.4. Why does ghostscript give lots of errors with my 386/486SX?
6.5. Why do SCO/iBCS2 applications bomb on ``socksys''? (FreeBSD 3.0 and older only).
6.6. How do I configure INN (Internet News) for my machine?
6.7. What version of Microsoft FrontPage should I get?
6.8. Does FreeBSD support Java?
6.9. Why can't I build this port on my 3.X-STABLE machine?
6.10. Where do I find ld.so?
6.11. I updated the sources, now how do I update my installed ports?
6.12. Why is /bin/sh so minimal? Why doesn't FreeBSD use bash or another shell?

6.1. So, where are all the user applications?

Please take a look at the ports page for info on software packages ported to FreeBSD. The list currently tops 3400 and is growing daily, so come back to check often or subscribe to the freebsd-announce mailing list for periodic updates on new entries.

Most ports should be available for the 2.2, 3.x and 4.x branches, and many of them should work on 2.1.x systems as well. Each time a FreeBSD release is made, a snapshot of the ports tree at the time of release in also included in the ports/ directory.

We also support the concept of a ``package'', essentially no more than a gzipped binary distribution with a little extra intelligence embedded in it for doing whatever custom installation work is required. A package can be installed and uninstalled again easily without having to know the gory details of which files it includes.

Use the package installation menu in /stand/sysinstall (under the post-configuration menu item) or invoke the pkg_add(1) command on the specific package files you are interested in installing. Package files can usually be identified by their .tgz suffix and CDROM distribution people will have a packages/All directory on their CD which contains such files. They can also be downloaded over the net for various versions of FreeBSD at the following locations:

or your nearest local mirror site.

Note that all ports may not be available as packages since new ones are constantly being added. It is always a good idea to check back periodically to see which packages are available at the ftp.FreeBSD.org master site.

6.2. Where do I find libc.so.3.0?

You are trying to run a package built on 2.2 and later on a 2.1.x system. Please take a look at the previous section and get the correct port/package for your system.

6.3. Why do I get a message reading ``Error: can't find libc.so.4.0''?

You accidently downloaded packages meant for 4.X and 5.X systems and attempted to install them on your 2.X or 3.X FreeBSD system. Please download the correct version of the packages.

6.4. Why does ghostscript give lots of errors with my 386/486SX?

You do not have a math co-processor, right? You will need to add the alternative math emulator to your kernel; you do this by adding the following to your kernel config file and it will be compiled in.

    options GPL_MATH_EMULATE

Note: You will need to remove the MATH_EMULATE option when you do this.

6.5. Why do SCO/iBCS2 applications bomb on ``socksys''? (FreeBSD 3.0 and older only).

You first need to edit the /etc/sysconfig (or /etc/rc.conf, see rc.conf(5)) file in the last section to change the following variable to YES:

    # Set to YES if you want ibcs2 (SCO) emulation loaded at startup
    ibcs2=NO

It will load the ibcs2 kernel module at startup.

You will then need to set up /compat/ibcs2/dev to look like:

    lrwxr-xr-x  1 root  wheel         9 Oct 15 22:20 X0R@ -> /dev/null
    lrwxr-xr-x  1 root  wheel         7 Oct 15 22:20 nfsd@ -> socksys
    -rw-rw-r--  1 root  wheel         0 Oct 28 12:02 null
    lrwxr-xr-x  1 root  wheel         9 Oct 15 22:20 socksys@ -> /dev/null
    crw-rw-rw-  1 root  wheel   41,   1 Oct 15 22:14 spx

You just need socksys to go to /dev/null (see null(4)) to fake the open & close. The code in -CURRENT will handle the rest. This is much cleaner than the way it was done before. If you want the spx driver for a local socket X connection, define SPX_HACK when you compile the system.

6.6. How do I configure INN (Internet News) for my machine?

After installing the inn package or port, an excellent place to start is Dave Barr's INN Page where you will find the INN FAQ.

6.7. What version of Microsoft FrontPage should I get?

Use the Port, Luke! A pre-patched version of Apache is available in the ports tree.

6.8. Does FreeBSD support Java?

Yes. Please see http://www.FreeBSD.org/java/.

6.9. Why can't I build this port on my 3.X-STABLE machine?

If you are running a FreeBSD version that lags significantly behind -CURRENT or -STABLE, you may need a ports upgrade kit from http://www.FreeBSD.org/ports/. If you are up to date, then someone might have committed a change to the port which works for -CURRENT but which broke the port for -STABLE. Please submit a bug report on this with the send-pr(1) command, since the ports collection is supposed to work for both the -CURRENT and -STABLE branches.

6.10. Where do I find ld.so?

If you want to run some a.out applications like Netscape Navigator on an Elf'ened machine such as 3.1-R or later, it would need /usr/libexec/ld.so and some a.out libs. They are included in the compat22 distribution. Use /stand/sysinstall or install.sh in the compat22 subdirectory and install it. Also read ERRATAs for 3.1-R and 3.2-R.

6.11. I updated the sources, now how do I update my installed ports?

Unfortunately, there is no easy way to update installed ports. The pkg_version(1) command can be used to generate a script that will update the installed ports with a newer version in the ports tree:

    # pkg_version -c > /tmp/myscript

The output script must be edited by hand before you use it. Current versions of pkg_version(1) force this by inserting an exit(1) at the beginning of the script.

You should save the output of the script, as it will note packages that depend on the one that has been updated. These may or may not need to be updated as well. The usual case where they need to be updated is that a shared library has changed version numbers, so the ports that used that library need to be rebuilt to use the new version.

If your system is up full time, the periodic(8) system can be used to generate a weekly list of ports that might need updating by setting weekly_status_pkg_enable="YES" in /etc/periodic.conf.

6.12. Why is /bin/sh so minimal? Why doesn't FreeBSD use bash or another shell?

Because POSIX says that there shall be such a shell.

The more complicated answer: many people need to write shell scripts which will be portable across many systems. That is why POSIX specifies the shell and utility commands in great detail. Most scripts are written in Bourne shell, and because several important programming interfaces ( make(1), system(3), popen(3), and analogues in higher-level scripting languages like Perl and Tcl) are specified to use the Bourne shell to interpret commands. Because the Bourne shell is so often and widely used, it is important for it to be quick to start, be deterministic in its behavior, and have a small memory footprint.

The existing implementation is our best effort at meeting as many of these requirements simultaneously as we can. In order to keep /bin/sh small, we have not provided many of the convenience features that other shells have. That is why the Ports Collection includes more featureful shells like bash, scsh, tcsh, and zsh. (You can compare for yourself the memory utilization of all these shells by looking at the ``VSZ'' and ``RSS'' columns in a ps -u listing.)

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.