Compiling errors on Ubuntu - FlightGear and Toribash

Q I installed Ubuntu and all went well. I was impressed with the user interface and was able to get networking, Nvidia support and printing up and running quite easily. Unfortunately that's as far as I got. I decided to install some software, starting with FlightGear. I unzipped the files and then tried to find the install instructions, or as I would do in Windows, the install Exe file. I eventually found some instructions, obviously written by a programmer, telling me how to compile the program. I followed the command line instructions to the letter, but only succeeded in generating errors. Not to give up too soon I followed the instructions for installing Toribash.

The first part worked, but when I typed toribash_ubuntu7 at the command prompt it gave me an error saying "bash: toribash_ubuntu7; command not found". I would love to be able to dump, or at least sideline Windows, but if it is this difficult to install a program on Linux, then I fear it will be some years yet. Given the enormous energy, intelligence and dedication the program writers have put in, could one of them not write a simple install.exe for Linux to allow those who wish to put their toes in the Linux water, the mechanism to do so?

A One of the biggest challenges when trying a new operating system is "unlearning" the ways you currently do things. Linux is not Windows and many things are done differently, and software installation is probably the most extreme example of this. There are three main ways to install a package in Linux: compiling from source, downloading a package from the program's website (or a DVD) and installing through the distro's package manager. The middle option is the closest to the Windows approach, although it does not use executable files - instead the file is a package containing all you need, and is loaded with a package manager. If there is a Deb file available, install it with

sudo dpkg --install someprogram.deb

This works, but it suffers some of the same limitations as the Windows method. You have to revisit the website to see if updates are available, there may be conflicts with other installed software and you have no idea about the integrity of the package you have just downloaded. All of these are avoided by using the distro's package manager and repositories. A repository is a collection of packages that have been built and tested for your distro, and verified to be free of any known security vulnerabilities. Packages are digitally signed, and verified by the package manager, to ensure you get only "clean" software. Not only is this the best way to install software, it is also the most convenient and includes almost everything you can want.

Simply start Synaptic (in the case of Ubuntu), press the Search button to find what you are looking for, pick what you want to install and click on Apply. The package manger takes care of sourcing the packages it needs, including any dependencies, packages required by your package, downloading and installing them. It will also keep you informed up any updates as they become available. Some of the graphical package managers, such as SUSE's Yast, will also install from a package you downloaded or found on a DVD, but Synaptic does not currently do this, hence the need for the dpkg command given before. If you want to compile programs from source, you will need the build-essentials package -install this from Synaptic. The Toribash error arose because Linux will only look for commands in a list of specific directories, which as a security measure excludes the current directory. To run a command located in the current directory, prefix its name with ./, as in ./toribash_ubuntu7.

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar