Software
From LXF Wiki
| Table of contents |
Where To Get It
Binary Packages
Binary packages are software packages that are already compiled, and only need to be installed to run. Users coming to Linux from Windows will be familiar with this idea: You download the software that you want, install it and run it by doing the following:
- Become root:
su
- Execute the binary:
./binary_package_filename
- If this gives you an error about permissions problems, do the following:
sh binary_package_filename
- Then "logout" of being the super user by doing Ctrl-D (preventing any nasty accidents).
If you're using Ubuntu you can ignore the above and just do the following:
sudo sh binary_package_filename
And enter your password when prompted.
Package Repositories are web or ftp sites with large numbers of packages that you can search and download.
Source Packages
Source packages contain the program source code and need to be compiled before they can run. The benifit is that the software will be built to match the platform that it is compiled on, although extra libraries of code may be required to complete the compilation procedure. Compiling a package creates a binary, which can be run (executed).
Most software for linux will have a project homepage, where the source code and documentation can be downloaded, and where bug reports and feature or support requests can be submitted.
Required Libraries
Binary packages can require certain libraries of code which support them or provide functions to be installed, before they can sucesfully be installed onto a system. This is called a package dependancy.
Source packages may require certain libraries to be available during compilation or at run-time.
What To Do With It
Now you've got hold of that package/code, how do you use it?
How To Install Packages
Package based systems take care of the installation procedure automatically. Most have a GUI so that you can point and click. Alternativley there will be a command that can be run in a terminal with a number of options. You will need super-user priviliges to install most packages.
How To Compile Software
Most source packages have automatic build scripts in the directory that they unpack into. ./configure in that directory, followed by make and then make install which will need to be executed as the super-user (root user). These will attempt to automatically configure the compilation process for the way that your distro is set up (where source code / libraries are stored, etc.). If the automatic configuration script fails, you may need to use some command line options to tailor it to your system.
How To Configure Options
Type:
./configure --help | more
It will give you a list of configuration options (Use space to advance to the next page, and q to go back to the command line). Then use ./configure again, with the appropriate options, and recompile the program.
How To Use It
Where Has It Gone?
When you want to start your newly-installed program, type the program name:
program_name
If this doesn't work, it means one of two things (provided you did actually install the program): either the program is not in the path (the variable which defines where the computer looks for programs), or is under a different name. If you think the former is the case, do the following:
find /usr '*program_name* -print
This should give you filename(s) like the following:
/usr/local/bin/program_name
So you know that the program is located in the directory /usr/local/bin. You could just execute the program (/usr/local/bin/program_name), but the best thing to do is to add the location to your Path:
export PATH=$PATH:/usr/local/bin
Then, it should just run. If it doesn't, however, the program is under a different name. Look on the program's website first, but if that doesn't work, do the following:
apropos program_name
This should give you a list of manual pages describing programs which match program_name. To read one, type:
man manpage_name
At the top, it will tell you how to use the program.
How To Use Command Line Options
The behaviour of most linux software can be controlled by giving options at the command line, which will generally be a hyphen (-) followed by a letter, or a double hyphen (--) followed by an option name and value. Most programs will offer an overview of the command line options by running with programname --help. Alternativley try man programname to see if a manual page has been entered for that program.
How To Understand Error Messages
If the error message contains a filename ending in .so.x , you are probably missing a library. Go to RPM.pbone (http://rpm.pbone.net) and search for RPMs containing that filename. Install them, and try again.
If it says that it cannot initialize sound, search for an option (see above) that lets you disable sound (Often --nosound).
It could just be an error in the program itself. In this case, contact the program's author with the error message.

