Fedora linux install package

Installing software from source on Fedora

Most of the software you will install on your Fedora system will either come from a desktop application manager tool such as the GNOME Software tool or from a command line package manager such as dnf. These tools make it easy to install, update, and if needed remove applications on your system.

However, there might be times where you will need to install an application from source, meaning to take the application source code and compile it into a working application.

This can be because of the fact that:

  • No pre-compiled binary or application package is available.
  • You have specific dependency requirements that are not available in the pre-compiled package.
  • The available pre-compiled application is out of date and you need a specific version.

In these cases you will need to install the software from the command line, using the source files provided by the application developers or maintainers.

Before you start

To install an application from source, you will need to have:

  • A way to extract the source file archive. This is usually an application such as tar or gzip .
  • A build tool and a compiler, such as make .

These tools are generally installed by default on a modern Fedora system. You can verify that they are available by typing in make , tar , and gzip from the command line. You will see instructions on how to use the application if it is available. If the application is not available you will get an error along with instructions on how to install.

How to install from source

To install from source, you will need to do the following:

  1. Download the application archive file to your computer. The default location is the Downloads folder, but you might be able to choose a location during the download process.
  2. Extract the files from the downloaded archive. The command you use will depend on the application package.
  3. Carefully read any instructions that came with your download. These instructions might also be available on the website you downloaded the file from. These instructions will tell you what you need to do to install the application.
  4. Follow the commands given in the README (or other installation instructions) to configure, build, compile, and install the application.
Читайте также:  Linux dev disk by label

Download the application archive to your computer

The default download location is your Downloads folder. From the command line the location is /home/username/Downloads (note the capital D in Downloads).

Extract the files from the archive

Most applications require many files or even directories, packaged together into an archive. The most common archives are «tarballs,» with the files packaged by using the tar (tape archive) command. These will have a .tar file extension.

In some cases the files will use a variation of the Zip archive format, such as .zip or .gz . Depending on the size of the download the application developer might use both tar and gzip together, so that the file will have a .tar.gz extension.

To extract files from a .tar archive:

-xf means to extract the files from the tar archive.

To extract files from a tar.gz archive:

-zxf means to unzip the archive, and extract the files from the tar archive.

To extract files from a .gz archive:

-d means to decompress the archive, which extracts the files.

You can also use gunzip , which is an alias for gzip -d .

To extract files from a .zip archive:

Use the man command to learn more about tar , gzip , and unzip : man tar , man gzip , or man unzip . You can also find their man pages online: Linux man pages. Search for the command you want to look up.

The See also section has links to the official documentation for these commands.

Carefully read any instructions that came with your download

When you extract the archive it will leave you with a directory with the same or similar name. You can now change into that directory to find the installation instructions that tell you how to configure and build the application.

The extracted folder for the application will have a README or some other file that gives instructions on how to install, configure, and manage the application. The README file will have detailed directions on things such as:

  • Choosing an alternate directory for installation.
  • Setting configuration options for the build.
  • What compile time options to use for different configurations.
If no instructions exist on how to configure or build the application, you will need to reach out to the application developers for help. You might also find instructions online from someone else who had a similar issue.

Follow the instructions to configure, build, compile, and install the application

After you understand what options are available, you can install the application. In general you will need to:

  1. Configure the application by using the configure command.
  2. Build and compile the application by using make .
  3. Install the application by using make install . The make install command will need to run using sudo so it can write to system directories and local directories.

Here is an example of the entire process, from extracting the files from a .tar.gz archive to building the application:

$ tar -zxf archive.tar.gz $ cd archive/ $ ./configure $ make $ sudo make install

Your application is now installed. The README file or the application website will have more information about how to use the application.

Читайте также:  Bootable usb creator in linux
If you get any errors during the configure and build process, carefully read the error messages and follow the instructions on how to resolve them. There can be dependency issues for some applications, meaning that to install application C, you need to have applications A and B installed. Resolving dependency issues can be challenging and you might need to look for help online to help solve the problem.

See also

Источник

How to Install an RPM File On Linux OS (CentOS, RHEL, & Fedora)

While working in Linux, you may have seen downloadable files with the .rpm extension. Rpm files are designed to be downloaded and installed independently, outside of a software repository.

This guide will show you how to install a .rpm file to your Linux CentOS or Fedora system.

how to install rpm file on linux

Note: RPM Package Manager (RPM) is a free and open-source package management system for installing, uninstalling and managing software packages in Linux.

  • A user account with sudo privileges
  • Access to a terminal window / command line (Menu > applications > utilities > terminal, Ctrl-Alt-F2)
  • RPM, DNF, & YUM Package Managers (all included by default)

Step 1: Download RPM Installation File

Typically, a web browser is used to locate and download a .rpm file. However, if a browser is not available you can still download a file if you know where it’s located.

You may need to install a software tool called wget .

To install wget in CentOS, enter the following in a terminal window:

To install wget in Fedora, enter the following:

Now, you can use the wget command to download the .rpm file you want. Enter the following:

wget http://some_website/sample_file.rpm

The system should reach out to the website and download the file to your current working directory.

Note: You can look up the address of a particular .rpm file in a web browser on another system. Also, this is a handy way to install more recent software versions or special non-standard software. Also, take care when installing software packages! Make sure you trust the source before you install. Usually, a developer will include a verification method to make sure you’re getting authentic software.

Step 2: Install RPM File on Linux

Install RPM File Using RPM Command

To install a .rpm package in CentOS Linux, enter the following:

sudo rpm -i sample_file.rpm

The -i switch tells the package manager you want to install the file.

More information on the RPM installer can be found in the RPM documentation.

Install RPM File with Yum

Alternately, you can use the yum package manager to install .rpm files.

sudo yum localinstall sample_file.rpm

The localinstall option instructions yum to look at your current working directory for the installation file.

Читайте также:  Linux bash объявление переменных

Note: YUM stands for Yellowdog Updater Modified. Normally, yum looks to your enabled software repositories for new software packages to install. More recent verbiage suggests using install instead of localinstall, but it’s up to you.

Install RPM on Fedora

To install an .rpm package on Fedora Linux, enter the following:

sudo rpm -i sample_file.rpm

Just as in CentOS, the -i switch tells RPM to install the software.

Another method is to use the dnf utility to install the package:

sudo dnf localinstall sample_file.rpm

Unlike many Linux tools, DNF is not a set of initials. It is merely the next evolution of the yum package manager.

Remove RPM Package

The RPM installer can be used to remove (or uninstall) a software package.

Enter the following into a terminal window:

sudo rpm -e sample_file.rpm

The -e option instructs RPM to erase the software. Check RPM Dependencies

So far, this guide assumes the software either doesn’t have dependencies or already has them installed.

To check the .rpm file for dependencies using the following command:

sudo rpm -qpR sample_file.rpm

The system should list all the dependencies:

  • -q – This option tells RPM to query the file
  • -p – This option lets you specify the target package to query
  • -R – This lists the requirements for the package

If there are any missing dependencies, you can install them from the standard repositories using yum or dnf. If your software requires other non-standard software, it will often be noted in the installation instructions.

Download RPM Packages from the Repository

One exciting feature of the yum package manager is that it allows you to download .rpm files directly from the repository. This might be helpful if you have limited bandwidth, or want to copy a single downloaded file between systems. It could also help if you have intermittent internet access, and you don’t want to spend time waiting for your installer to finish.

To download a .rpm file from the repositories, enter the following:

sudo yumdownloader packagename

If you wanted to download the files for Apache, for instance, you’d replace packagename with httpd. You can then install the file as above.

Note: In Linux, administrators find it helpful to have a single tool to manage software. That tool – called a package manager – can install software, keep track of software requirements, and track updates and patches. Package managers also work with repositories, which are secure and standardized libraries of commonly-used and well-supported applications. If you had to install wget in Step 1, that’s an example of installing from a repository.

In this tutorial, we covered three different options for installing RPM files on Linux.

As with most Linux software, your default package manager makes it simple to track installations, updates, and prerequisites.

Источник

Оцените статью
Adblock
detector