How To Install Downloaded Packages On Linux UPDATED

How To Install Downloaded Packages On Linux

About modernistic Linux distributions savour standard repositories that include most of the software you'll need to successfully run your Linux server or desktop. Should a packet come up up missing, more likely y'all'll notice a repository you can add, so that the installation can be managed with the built-in package manager. This should be considered a best practice. Why? Because it's of import for the integrity of the platform to ensure the package manager is aware of installed software. When that is the case, packages can easily be updated (to set up vulnerabilities and the like). Another reason to install from repositories is that dependencies are easily met. When installing from source, you can sometimes notice yourself trapped in a convoluted dependency nightmare.

Fortunately, repositories have get and so inclusive, that it is rare y'all will always need to install a package by any other means. Still, you may find, on occasion, a reason to install from source. Reasons could include:

  • A bundle that is not found in any repository

  • A parcel developed in-business firm

  • Yous demand to install a package with custom dependencies or options

When you do have to install from source, there are certain things you will demand to know. Allow's walk through the process of installing Audacity from source on Ubuntu 16.10 (with the help of build-dep ). Although this can exist hands installed from repositories, it serves as a fine illustration for installing from source.

First things first

Installing from source used to be very common and also quite elementary. Yous would download the source file, unpack it (with either zip or tar), modify into the newly created directory, and then issue the commands:

                      ./configure                                make                                make install                  

That still works for applications built with autoconf/automake. As long as your distribution met the necessary dependencies (which were almost e'er outlined in a README file within the source), the parcel would install and could be used. Although some source installations are nevertheless that simple, things are at present a bit more complicated.

Another glitch in the modern organisation is that Ubuntu doesn't transport with all the necessary tools to build from source. To solve that consequence, yous must kickoff install autoconf with the control:

                      sudo apt-become install autoconf                  

Depending upon which version of Ubuntu y'all installed, you lot may even have to install the build-essential and build-dep packages (which includes the gcc/grand++ compilers and libraries likewise as a few other necessary utilities). These two packages tin be installed with the command:

                      sudo apt-become install build-essential build-dep                  

For the likes of Fedora, a similar installation would be:

                      sudo yum install yum-utils                  

The above control would install the yum-builddep package.

Installing from source with build-dep

One fashion to install from source, but avert the dependency nightmare, is to first work with the build-dep tool. Say you desire to install audacity using build-dep ; the first affair you must do is uncomment the deb-src listings in /etc/apt/sources.list . Open that file in your favorite editor and then uncomment out the two deb-src listings, past removing the leading # characters ( Figure i ).

Figure 1: Configuring apt so information technology tin can use build-dep.

Relieve and close that file. Now run sudo apt-go update to update apt. In one case that is done, you're ready to build Brazenness from source. Here'due south what you must exercise. The first step is to employ apt to install the necessary dependencies for Brazenness. This is taken care of with the command:

                      sudo apt-get build-dep audacity                  

Allow that command to end. The next footstep is to download the source package with the command:

                      sudo apt-get source audacity                  

In your current working directory, you should see a new directory chosen audacity-XXX (where 30 is the release number). Change into that directory. At this point, you tin can now consequence the sometime tried and true:

                      ./configure                                make                                sudo make install                  

Audacity should at present exist installed and ready to employ.

If the installation fails, y'all might take to revert to using the dpkg tool like so:

                      sudo dpkg-buildpackage -b -uc -us                  

The options higher up are as follows:

  • b – build binary

  • uc – do not sign the .changes file

  • us – practise not sign the source package

Why might a source package neglect to install? Beyond non having all of the necessary dependencies, the answer very well might prevarication in the ./configure command.

The magic of configure

That configure command does have some magic hidden within. Most oft you tin run the ./configure command without any arguments. Nevertheless, there are times you lot might want (or be required) to issue the command such that it configures the software to meet certain needs. Fortunately, the make tool can assist us here. If you lot effect the command ./configure –help (from within the application source directory you've downloaded), you will be presented with a list of configuration options that can exist used ( Effigy two ), specific to that package.

Figure ii: Options available for the source installation of Audacity.

These options can sometimes mean the departure between an awarding installing or not. Every application you effort to install volition display different options for the ./configure command, so make sure to result ./configure –help before issuing ./config . Possible configuration options include:

  • –prefix=PREFIX (install architecture-independent files in a non-standard location such as –prefix=/opt )

  • –build=BUILD (configure for a specific system architecture)

  • –host=HOST (the architecture of the system yous want the file to run on, then you can compile the application on i machine and run information technology on some other)

  • –disable-FEATURE (this allows you to disable specific features of an awarding)

  • –enable-Feature (this allows you to enable specific features of an application)

  • –with-PACKAGE=yes (use a specific Bundle)

  • –without-PACKAGE (do non use a specific Packet)

Equally I mentioned, every software to be installed will offering different configuration options. Once yous've decided on your options, you would then run the ./configure command (with all options). In one case the configure script completes, follow it up with make and so make install to complete the installation.

Using Git

Let's walk through some other example, this time with the help of Git. As Ubuntu doesn't ship with Git installed, nosotros'll first accept to install it with the command:

                      sudo apt-go install git                  

Once this is installed, permit'south pull down the source for the Clementine sound histrion with the command:

                      git clone https://github.com/clementine-role player/Clementine.git                  

With the source downloaded, change into the newly added directory with the command cd Clementine . At this point, run the post-obit commands to build the role player from source:

                      cd bin                                cmake ..                                make -j8                                sudo make install                  

That's information technology. Yous should now have a working install of Clementine (and so long every bit you've met the necessary dependencies). If the installation complains almost dependencies, you tin scan back through the output to detect out what all needs to exist installed. In the case of Clementine, you could always pick up the dependencies with the command:

                      sudo apt-get build-dep clementine                  

And in that location you become

That, my friends, is your introduction to installing from source. You might at present not simply have a better understanding equally to how such an installation is handled, but why so many opt to featherbed installing from source, and go straight to their distribution's package managing director. Dependency nightmares and a lack of consistency in steps helps to make the likes of apt , dpkg, yum, zypper, and dnf all the more than appealing.

Yes, installing from source offers far more flexibility, but that flexibility comes at the cost of simplicity.

Learn more about Linux through the gratuitous "Introduction to Linux" class from The Linux Foundation and edX.

DOWNLOAD HERE

Posted by: mcilvainagniza1998.blogspot.com

Post a Comment

Postagem Anterior Próxima Postagem

Iklan Banner setelah judul