I was wondering about generic installations of all applications in linux. And what that means? Well, when I was using windows I knew that if I want to install an application I am double-clicking the .exe file and then next,next,next.
In linux, I have understood that maybe there is a common (not generic) way to install any application. Installing from source maybe? Well is there any step by step method that can be used to install application like in windows or not?
I am asking because I do not want to keep asking the google, how to? So, I have managed to install recently from source freecad from this guide and I think that it would be a very nice start as common method, right?
But the thing then is where to find the right source and when an application has a very unique method of installation!
Installation instructions vary across programs although there are well-established tools like autotools (includes automake and autoconf) and cmake.
Since programs can come in different programming languages, its hard to give generic commands that suit all packages. For example, Python often have setup.py scripts where C programs often use autotools or at least a Makefile.
I always start with finding the INSTALL, README or similar files. If you need to compile a program from source, you likely need the
build-essential
package which depends on compilers and other generic development packages.Depending on the program you're trying to compile, you might need to install other dependencies. Check the README for that or the output of the
./configure
script (an executable file located in the root of the extracted source). For example, if it says that you need "x11 development headers", try finding "x11-dev" or "libx11-dev" in the repositories (in this case, it'slibx11-dev
what you're looking for).Source distributions that were built with autoconf/automake can be extracted and configured with:
Use
./configure --help
for available options. By default, the files are often installed to/usr/local
which is perfectly fine. Unless you're going to package the file into a .deb file, do not change this prefix to/usr
as it may conflict with the package management system (dpkg).make
is supposed to start compiling everything wheremake install
installs the files to the designated locations (sudo
is necessary for writing to privileged locations like/usr/local
). To uninstall it later, run from the source directorysudo make uninstall
(providing that the package is properly build with autoconf/automake, which is a responsibility of the developer, not you, the user!If you're just interested in compiling a package from the software center on your computer, proceed with (replace
package
and the version accordingly):See the respecxtive manual pages for more details on the commands. (e.g. run
man dpkg-buildpackage
in a terminal). After performing these commands, you'll have a .deb file in the parent directory. It's recommended to use the packages from Ubuntu repositories where possible. The above steps are shown for educational reasons, but generally you want to make a modification to some files before building the package.FreeCAD is available in the Ubuntu Software Center, so it was not necessary to build and install it from source code.
The Ubuntu Software Center always the first place where you should look. Installing is just a matter of clicking a button.
There's an icon for the Ubuntu Software Center in the bar on the left side of the screen.
If you really want to build and install a program from source, then look for a README file or other instructions that come with the program.
Many software packages use GNU autotools as the build system and can be built and installed with the following commands:
Before building a program you'll need to check what the required libraries and other dependencies are (that should also be mentioned in the documentation for the program). On packages.ubuntu.com you can find the Ubuntu packages that contain the required libraries.
Suppose the program needs a library called
blah
, then you'll probably need to install the packagelibblah-dev
(lookup the exact name on the Ubuntu Packages page I mentioned above).There are only two basic approaches:
apt-get
, etc.). This is normally the best option. Going outside this method can lead to problems, such as conlficts and difficulties with updates, so you should only do something elseif you know what you're doing.Read the documentation and use it to install. You might find it on the project's website, or in the tarball, or from the place you got your file. Or, there might be no documentation, in which case you have to Google or guess. There are very many different ways to install software. If this gets confusing, go back to number 1.
If your package uses the standard
./configure; make; sudo make install
, you can usecheckinstall
to get a .deb of what you built. That way, you don't have to sacrifice package management.Installing from source is very difficult to support.
Whenever possible, install from software center. That is the equivalent of the windows next->next->finish mentality.
You can install things from source on windows too. That's not unique to linux, it's just that more source available applications target linux.
Ubuntu offers a variety of installation methods
Via centralised packaging system
This is the preferd method in ubuntu (but personally I don't like it) software-centre ,synaptic, and aptitude are examble for it
Standalone deb package:- This method is simpler as in the case of windows ,just double click the file and press install button Eg:Gdebi package manager
binary software: these are very similar to windows .exe installation, It offers variety of gui for Installer, These are usually .bin files
you can use bit rock or similar tools to make such packaes
autopackage and similar tools :-these are third party package managers created to support various linux distros
Warning:-These are my observation only ,I am a newbie in linux ,So fell free to edit/downvote If there is anything wrong