[last updated: 2024-10-12]
Linux home page
Linux commands
-----
Generic Instructions for Installing Linux Packages:
---------------
Much of this page is copied (with edits for grammar & layout plus some additions for clarity) from:
(link to:) Linux Mint Community tutorials
by user: jahid_0903014 - Jahidul Hamid
---------------
This tutorial will cover most of the processes for installing software in a Linux system.
Online installation:
- #1: Software manager/center:
- #2: Synaptic:
- #3: Terminal:
- #4: PPA:
Offline installation:
- #5: .deb packages:
- #6: .rpm packages:
- #7: Archive packages:
- #8: Pre-installed archives:
- #9: .sh files:
- #10: .run files:
--------------------------------------
Online installation:
- #1: Software manager (Linux Mint)/software center (Ubuntu):
first open the terminal and run this command to get the latest version of the software:
$ sudo apt-get update
then:
1. Open software manager/center:
Menu (lower left corner of screen)
(on my Mint installation...) All Applications - scroll to Software Manager
2. Search for your desired software in the search box.
3. If it's there, execute:
$ apt-cache policy [packageName]
or: $ apt-cache madison [packageName] (don't know difference between policy and madison...)
to find out what version is there,
and if acceptable,
double-click on it, then click "install".
4. It will be installed on your system.
5. If the package you want is not there, follow the instructions in the PPA installation section below.
- #2: Synaptic package manager:
If the package you want is not in your Linux distribution, then you must install it through software manager/center first. [typo? does he mean Synaptic?]
1. Open Synaptic package manager. Click reload to get the latest version of the software.
2. Search for your desired software in the search box.
3. Right-click each software you want to install and mark them for installing. It will mark additional dependencies on it's own.
If your software is not in the list, follow the instructions in the PPA installation section below.
4. After marking for installing, click apply.
6. It will download and install the marked software.
additional info:
If you have a list of software then save the file with the list, with .list extension (this file should contain the exact package names one on each line, with an extra string "install" included after each package name, preceding by a space). Then go to file > read markings, then browse to the file and open it. Synaptic will mark the software in the list automatically.
- #3: Terminal:
If you know the exact name of the software package you want:
First verify that it's not already installed, with:
$ dpkg -s [packageName]
Then if not installed already, install it with:
$ sudo apt-get update (to get the latest version)
$ sudo apt-get install [software-package-name]
If it says "unable to locate package..." then follow the instructions in the PPA installation section below [...or Synaptic above???].
- #4: PPA installation:
(see also: (link to:) ItsFoss.com detailed explanation of PPA)
If your software is not in the software list, then it may come from a private package archive (PPA).
These are private developments of software, so use them at your own risk.
Steps:
1: Search Google for the PPA address for your software. (eg. search for: ppa for [package-name])
2: Add it to the repository with this command in the terminal:
$sudo add-apt-repository [ppa:.....package-location]
3: Then run this command:
$sudo apt-get update
4. Now your desired software is in the list, so you can install it with one of the above processes (#1, #2, or #3)
-------------------------------------------
Offline installation:
If you downloaded your desired software package from a website:
- If you don't trust the origin of the software, then don't install it, or install it at your own risk.
- Your downloaded software may come as a .zip, tar.gz, tar.bz2, .deb, .rpm, .tgz, tar.xz or other types of archives.
- if you are running Linux mint, or Ubuntu, or any other Debian-based distribution, try to download .deb packages, because they're easier to install in Debian-based systems
- #5: Installing .deb packages:
Through terminal:
$ cd [path-to-the-directory-that-contains-the-deb-file]
$ sudo dpkg -i [filename].deb
through gdebi package manager:
If gdebi is not installed, then you must first install it through one of the processes above (#1, #2, or #3)
then double-click on the .deb file or open the file with gdebi package manager and click install.
- #6: Installing .rpm packages:
If rpm is not already installed in the system, then follow one of the processes above (#1, #2, or #3) to install it
Then:
$ cd [path-to-the-directory-that-contains-the-rpm-file]
$ sudo rpm -i [filename].rpm
- #7: Installing from archives (.zip, tar.gz, ... etc):
These archives generally contain the source files of the package. Different archives may have different approaches for installation, but this method is intended to be generic enough to work for all of them.
- General requirements:
- 1. flex
- 2. bison or bison++
- 3. python
- Since these archives contain the source files, your system will need any programming languages used by the source files in order to compile them. So the general packages listed above may not be sufficient. In that case you have to install the required packages through one of the processes above (#1, #2, or #3). You can find out about the dependencies of your software in a readme file included in the archives.
- Steps:
- 1. Open the archives with archive manager by double clicking it, then extract it.
- 2. execute:
$ cd [path-to-the-extracted-folder]
- 3. in the extracted folder:
- a. If there is a file named 'configure,' then:
$ ./configure
$ make
$ sudo make install
If the above code fails to execute, then run this code before above codes:
$ chmod +x configure
- b. If instead of 'configure,' there is a file named install.sh, then:
$ chmod +x install.sh
$ ./install.sh or sudo ./install.sh (if it needs root permission)
or you can double click it and select run in terminal or simply run.
Note: sometimes instead of install.sh, there may be a file named something like your_software_name.sh. In this case, replace 'install.sh' in th code above with the .sh filename that you have.
- c. If you find a file named install, then:
$ chmod +x install
$ ./install or sudo ./install (if it needs root permission)
or you can double click it and select run in terminal or simply run
- d. If you find a file named 'make' (if there is no configure file), then:
$ make
$ sudo make install
- e. If you still can't find the required files, then they may be in a special folder (generally in a folder named 'bin'). Move to this folder with cd command with appropriate path, and then look again and follow the same process.
.
.
.
eof