- Installing Software on LinuxВ¶
- Debian, Ubuntu: APTВ¶
- Fedora, Red Hat: yum В¶
- Mandriva: urpm В¶
- Tar BallsВ¶
- Other SystemsВ¶
- How to Install Software on Linux
- Package managers
- Installing a downloaded file
- Installing from the GUI
- Bottom line: it’s all easier than it seems
- Ubuntu Documentation
- Introduction
- Packages and Package Management
- What is a package?
- Source or Binary?
- Package Dependencies
- Package Managers
- Software Channels/Repositories
- Installing a Package
- Via your web browser
- Via a basic graphical method
- for Ubuntu: «Sofware Centre «
- for Kubuntu : «Add/Remove Programs»
- Via an advanced graphical method
- for Ubuntu/Xubuntu/Edubuntu : Synaptic
- Via a Text Based Methods
- Aptitude — the text-based method
- apt-get — the technical method
- Installing downloaded packages
- Using GDebi to install packages
- Using dpkg to install packages
- Getting a list of recently installed packages
- Automatic updates: Update Manager
- Installing packages without an Internet connection
- Use Keryx
- Use the Synaptic package download script
- Use Offline apt-get update
- Use apt-offline
Installing Software on LinuxВ¶
One of the most difficult things to get used to in the Linux world is installing new software packages. In the world of Windows, every program comes with a Setup.exe program that asks you some very easy questions and takes care of the job for you. While Linux software can be almost that easy to install, you will sometimes find software that seems to fight every step of the way. I can’t cover all the problems you might run into, but I’ll try to give you the basics and a few pointers to help get you over the rough spots.
Software tends to come in “packages”. In the Windows world a package is a Setup.exe or a program.zip file. On a Mac a package is a program.dmg or a program.sit file. In the Linux world, there are several kinds of packages, and each distribution has its own preferred package format.
The standard Linux package format (according to the Linux Standard Base) is RPM. RPM is a packaging system originally developed by Red Hat and widely used in the Linux community. Distributions using it include Fedora, Mandriva, Red Hat (naturally), and SUSE. An RPM package file normally will be named something like program-version-other.rpm
Another popular package format is DEB, the Debian software package. Debian packages and the Advanced Packaging Tool (APT) were the first to introduce several advanced features that are now common, such as automatic dependency resolution and signed packages. Debian packages are used by Debian GNU/Linux (naturally), and distributions based on it, including Ubuntu, Knoppix, and Mepis. A Debian package file normally will be named something like program-version-other.deb
Remember, you will need to become SuperUser to install software.
Debian, Ubuntu: APTВ¶
There is a broad array of tools for working with DEB packages, but the one you will commonly use is apt-get , arguably the easiest of Linux package management tools. apt-get is so easy because it not only keeps track of what packages are installed, but also what other packages are available. It will even download them from the Internet for you (if properly configured).
To remove software is just as easy.
Although the repositories that contain installable packages might live on the Internet or on a disc somewhere, APT keeps a local database on your hard drive with a list of all available packages and where to find them. This database needs to be explicitly updated. To update the APT database:
A common idiom is to update your package database, and then upgrade all the packages that have patches or security updates to install. The following command will do this all at once.
For a more indepth apt-get tutorial and other resources, see Managing Software with APT and dpkg .
Fedora, Red Hat: yum В¶
yum does for RPM packages roughly what apt-get does for Debian packages. Like apt-get , yum can download and install packages from a configured repository.
To remove software is just as easy.
yum does not keep a local copy of your package database by default, so normally there is no need to update it. To install all available security patches and bug fixes, use this command:
You can also explicitly update a single package with:
For a more indepth yum tutorial and other resources, see Managing Software with yum and rpm .
Mandriva: urpm В¶
Mandriva Linux (formerly Mandrake and Connectiva) has a toolset similar to APT called urpmi . To install software:
To remove software:
To update the local package database:
To install security updates and bug fixes:
For a more indepth yum tutorial and other resources, see Managing Software with urpm .
Tar BallsВ¶
No, this is not a naughty term! A tar ball is a (usually compressed) archive of files, similar to a Zip file on Windows or a Sit on the Mac. Tar balls come in files that end in .tar , .tar.gz , .tgz , or something along these lines. To unpack a tar ball, use this command.
The parameters are x to extract files, z to filter through gzip for decompression (leave this off if the file does not have a gz extension), v for verbose mode so you can tell what’s going on, f indicating there will be a filename to follow. You may want to create an alias called “untar” that feeds in these options if you have a hard time remembering command line options as I do.
This command will not install the software, it will only extract the archived files. It is your job then to find the README file or INSTALL file and read its instructions for installation. If the archive contains binaries there will usually be a setup script (often called install.sh ) that you must execute as SuperUser .
Very often, software delivered in tar balls is not in executable form, but in source code, which must first be compiled before it can be installed. For more details on this, see Installing Software from Source Code .
Other SystemsВ¶
Some other Linux distributions have their own way of managing packages, notably SUSE. SUSE uses RPM as its native package format, but has its own high level tool to manage system software installation.
SUSE Linux uses a tool called yast (which allegedly is an acronym for Yet Another Setup Tool) to perform all kinds of system administration tasks, including installing software. Having no experience with it, I cannot give you more details. man yast for help.
Источник
How to Install Software on Linux
So you’ve made the switch to Linux. Or you’re thinking of making the switch. But you have questions that might be stopping you from fully diving in. One of the biggest concerns most new users have is, “What software is available and how do I install it?”
It’s a reasonable question. Why? For the longest time, Linux suffered from a stigma that applications were scarce, and that the few available options were a challenge to install. I remember, back in the early days, having to compile software from source packages—which would lead to a seemingly endless circle of missing dependencies. It was frustrating, but doable. That frustration, however, turned a lot of people away from Linux.
Fortunately, those days are long since past, and installing any of the available software titles (of which there are many) on Linux is no longer such a headache.
How to Get Started with the Linux Operating System
What operating system do you use? For some, that question may as well be posed in Latin or…
Before we get into the how-tos of actually installing software on Linux, there is one very important concept to understand:
Package managers
This is one of those topics that tends to confound most new Linux users. A package manager is a sub-system on Linux that, as the title says, manages the packages (software) on your computer. It’s a crucial component of Linux, in that it keeps track of everything installed; downloads packages; ensures all packages are installed in a common location; helps to upgrade packages; resolves dependencies; and keeps users from having to install from source code.
The biggest point of confusion is that there are numerous package managers available, but only one can be used on a distribution. In fact, distributions are differentiated, primarily, on which package manager they choose. For example: Debian and Ubuntu (and its derivatives) use apt; Red Hat Enterprise Linux , CentOS , and Fedora use yum; SUSE and openSUSE use zypper; and Arch Linux uses pacman. There are more package managers out there, but this is a good place to start.
Each package manager works with a different file type. For example, apt works with .deb files and yum and zypper work with .rpm files. The apt package manager cannot install .rpm files and neither yum or zypper can install .deb files. To make matters even more confusing, Ubuntu (and its derivatives) uses the dpkg command for installing local .deb files, and Red Hat (and its derivatives) use the rpm command to install local .rpm files.
Install a Windowed GNU/Linux Environment On Any Android Device With This Guide
Android’s designed largely for mobile users, but since it has Linux at its core, it can work with a
Confused yet? Don’t worry, it’s actually much easier than that.
Most package managers have GUI front ends. These front ends are similar to the Apple App Store. It should be no surprise that there are numerous such GUI front ends available. The good news here is that most of them are similarly titled (such as GNOME Software, Ubuntu Software, Elementary AppCenter). These app stores allow you to easily search for a software title and install it with the click of a button (more on this in a bit).
There is one other issue with package managers: repositories. Repositories are a key aspect of package managers, but for new users the concept can add yet another level of confusion we don’t want. For a quick overview, however, consider this: Out of the box you only have a certain selection of software titles available. That selection is dictated by the repositories that are configured. There are numerous third-party repositories you can add to the system. Once added, you can then install any software titles associated with those third-party repositories. Software repositories can be added either from a GUI tool or the command line.
In any case, repositories are an issue for a different day, and not necessary to understand for the type of software downloads discussed in this article.
Installing a downloaded file
I know, I know… I said one of the benefits of modern Linux operating systems is that you don’t need to install from a downloaded file. That being said, I want to start here. Why? There may be times when you find a piece of software not available in your distribution’s “app store.” When that occurs, you’ll need to know how to install that application manually. I will say that, for everyday, average use, it’s a rare occasion that you’ll need to do this. And even if you never do install using this method, at least you’ll have a very basic understanding of how it works.
Here, we’ll demonstrate using the latest release of Ubuntu Linux (as of this writing, 17.10). Most package managers install in similar fashion (with slight variations on the commands used). Let’s say you want to install the Google Chrome browser on Ubuntu. You won’t find this particular browser in the Ubuntu Software tool. To install it from the command line, you must download the correct file. As stated earlier, the correct file for Ubuntu will be a .deb file. So point your browser to the Chrome download page and click the Download Chrome button. The good news here is that your browser will be detected and the Chrome download page will know which file you need. Click the ACCEPT AND INSTALL button and a new window will appear, giving you two options (see below).
You can either save the file to your hard drive (and then install via the command line), or open the file with the Software Installer. It is important to understand that not every distribution includes the latter. If you do not get the Open with option, then you’ll have to install from the command line.
Let’s first use the Open with option. Make sure Software Install (default) is selected and click OK. The file will download and then Ubuntu Software will open, giving you the option to install (see below).
Click Install and you will be prompted for your user password. The installation will complete and Chrome is ready to use. You can close the Ubuntu Software tool and open Chrome from the Dash.
But what if you don’t get the option to install with the GUI tool? Then you have to select the Save File and run the installation from the command line. Don’t worry, it’s not that hard. Here are the steps to install the latest release of Chrome, on Ubuntu Linux, from the command line:
- Click on the square of dots at the bottom of the desktop
- When the Dash opens, type terminal
- Change into the Downloads directory with the command cd
/Downloads
Installing from the GUI
This is where things get very easy. To install from your distribution’s GUI, you only need open up the tool, search for the software you want, and click Install. Say, for instance, you want to install the GIMP Image editor . To do that, open Ubuntu Software and type gimp in the search bar. When the results appear, click on the GIMP entry, click the Install button (see below), and (when prompted) type your user password. Wait for the installation to complete and your new software is ready to be opened and used.
Bottom line: it’s all easier than it seems
Installing software on Linux isn’t nearly as hard as you might have thought. Yes, there may be the rare occasion when you need to install something from the command line, but even that isn’t much of a challenge. Besides, chances are, you’ll never have to install software outside of the GUI front end.
Do remember, if you use a distribution other than Ubuntu (or its derivatives), you’ll want to do a quick bit of googling to make sure you understand the differences between the apt package manager and the one used on your desktop.
Источник
Ubuntu Documentation
Introduction
Note: The Main page is available in multiple languages.
Installing software in Ubuntu is easy, and this guide will show you how to do it.
By default, many useful programs are already installed when you put Ubuntu onto your computer. However, you may need a particular piece of software that serves a purpose not served by the default applications. You might just want to try an alternative program to one which is already installed. In other words, you need new software.
If you’d like to get some background information on what’s happening when you install software (which can sometimes be technical), read Packages and Package Management. If you just want to get started installing new programs, you can skip straight to Installing a Package.
Packages and Package Management
This section covers the basic concepts of packages and package management. You will learn about what a package is, the differences between different types of package and also how package management works on Ubuntu.
What is a package?
Software is a very broad term, and is generally taken to mean a program which you can run on your computer. However, such programs often need other resources to work. When you install software, thousands of files may be required just to let the program start! When you think that they all have to be put in exactly the right location, and some of those files may need to be changed depending on what type of computer you have, it can all get very complicated. Luckily, Ubuntu can look after this complexity.
Ubuntu uses packages to store everything that a particular program needs to run. A ‘package’, then, is essentially a collection of files bundled into a single file, which can be handled much more easily. In addition to the files required for the program to run, there will be special files called installation scripts, which copy the files to where they are needed (amongst other things).
Source or Binary?
Normally, when someone makes a package for a program, they put all of the source code for the program into that package. Source code is written by programmers and is essentially a list of instructions to a computer which humans are able to read and write. Computers can only understand this code if it is interpreted for them into a form that they can use directly. One such way of interpreting source code for a computer is by translating or compiling it into binary, which computers can understand.
So why don’t the people who make the package (called packagers) just convert it into binary from the start? Well, different computers use different types of binary, so if you make a binary package for one type (like an Intel PC), it won’t work on another (like a PowerPC).
Source packages are simply packages which just include source code, and can generally be used on any type of machine if the code is compiled in the right way. (For information on how to compile and install source packages, see CompilingEasyHowTo).
Binary packages are ones which have been made specifically for one type of computer, or architecture. Ubuntu supports the x86 (i386 or i686), AMD64 and PPC architectures. The correct binary packages will be used automatically, so you don’t have to worry about picking the right ones. To find out which one you are using, open Applications → Accessories → Terminal, type uname -m then hit the enter key.
Package Dependencies
Programs often use some of the same files as each other. Rather than putting these files into each package, a separate package can be installed to provide them for all of the programs that need them. So, to install a program which needs one of these files, the package containing those files must also be installed. When a package depends on another in this way, it is known as a package dependency. By specifying dependencies, packages can be made smaller and simpler, and duplicates of files and programs are mostly removed.
When you install a program, its dependencies must be installed at the same time. Usually, most of the required dependencies will already be installed, but a few extras may be needed, too. So, when you install a package, don’t be surprised if several other packages are installed too — these are just dependencies which are needed for your chosen package to function properly.
An example of dependencies
Package Managers
A package manager is an application which handles the downloading and installation of packages. Ubuntu includes a few package managers by default, and which one you use depends on how advanced the package management tasks are that you want to achieve. Most people will only need to use the most basic package manager, the Add/Remove tool, which is very easy to use.
Software Channels/Repositories
Where can you get packages from?
Ubuntu stores all of its packages in locations called software channels or repositories. A software channel is simply a location which holds packages of similar types, which can be downloaded and installed using a package manager. A package manager will store an index of all of the packages available from a software channel. Sometimes it will ‘re-build’ this index to make sure that it is up to date and knows which packages have been upgraded or added into the channel since it last checked.
There are four Ubuntu software channels for each architecture — Main, Restricted, Universe and Multiverse. Each has a different purpose. By default, only packages from Main and Restricted can be installed. If you would like to install packages from Universe or Multiverse, see the Repositories page for instructions on how to do this.
In addition to the official Ubuntu repositories, it is possible to use third party repositories. Be careful, though — some are not compatible with Ubuntu and using them may cause programs to stop working or may even cause serious damage to your installation. The page http://www.ubuntulinux.nl/source-o-matic (page removed — why) can help you to find extra repositories, and the Repositories page gives instructions on how to enable them.
Installing a Package
This section explains how to install packages using the various tools available in Ubuntu,Xubuntu,Edubuntu and Kubuntu.
Via your web browser
In the Ubuntu Documentation, you will sometimes find sentences like for example:
» To install this software in Ubuntu, install the following package: supertux. «
Click on the name of the package («supertux» in the example):
- if the apturl protocol is enabled on your computer, you will be proposed to install the package called «supertux».
if not, please follow instructions of the AptURL page to enable apturl protocol on your computer.
Via a basic graphical method
Note that some packages can’t be installed via this method, in this case please use another method.
for Ubuntu: «Sofware Centre «
In recent versions of Ubuntu, the «Add/Remove» option in the Applications menu has been replaced by the Ubuntu Software Center.
for Kubuntu : «Add/Remove Programs»
Kubuntu’s new and easy method of installing packages is to use the ‘Add/Remove Programs’ tool. Click K-Menu → Add/Remove Programs to start it.
Add/Remove Programs is a simple graphical way of installing and removing applications in Kubuntu. To launch Add/Remove Programs, choose K Menu → Add/Remove Programs from the desktop menu system.
To install new applications select the category on the left, then check the box of the application you want to install. When finished click Apply, then your chosen programs will be downloaded and installed automatically, as well as installing any additional applications that are required. The default selection is restricted to KDE suite, but GNOME applications can be installed simply by selecting from dropdown menu at the top. Alternatively, if you know the name of the program you want, use the Search tool at the top.
Software from additional repositories may be installed by enabling the Show: Unsupported and Show: proprietary software checkboxes if they are enabled in your repository list. For more information, see the Repositories page.
Once this has finished, click Close.Your new programs are installed, ready to use!
Via an advanced graphical method
for Ubuntu/Xubuntu/Edubuntu : Synaptic
The Synaptic Package Manager offers a more advanced way of installing packages. If you have problems finding a suitable package with the Add/Remove tool, try using the search in Synaptic. This searches all of the packages in the available repositories, even the ones which don’t contain programs.
For details on using Synaptic, see SynapticHowto.
Via a Text Based Methods
Text based methods can be used across Ubuntu, Kubuntu and Xubuntu, but require familiarity with the terminal. When helping users to install packages, you should consider using an AptURL instead of apt-get or aptitude.
Aptitude — the text-based method
Aptitude is a text-based package manager, which must be run from a Terminal. Read the AptitudeSurvivalGuide for more information on how to use Aptitude.
apt-get — the technical method
The apt-get program is a command-line package manager, which should be used if the Add/Remove tool and Synaptic ever run into problems. It provides an advanced interface to APT, the underlying package management system which Ubuntu uses, but is reasonably easy to operate. Power users may find that apt-get is quicker to use and more powerful than the graphical options above.
For details on how to use apt-get, read AptGet/Howto.
Installing downloaded packages
You may wish to install a package you have downloaded from a website, rather than from a software repository. These packages are called .deb files. Because they may have been created for a different Linux distribution, you might find that there’s dependency issues with Ubuntu, meaning that they may be uninstallable.
To find a package which you have previously downloaded using Synaptic, aptitude or apt-get, look in /var/cache/apt/archives
Using GDebi to install packages
GDebi is a simple tool to install .deb files. It has a graphical user interface but can also be used in your terminal. It lets you install local deb packages resolving and installing its dependencies.. It automatically checks packages for their dependencies and will try to download them from the Ubuntu software repositories if possible. You may first need to install GDebi — simply install the gdebi package using one of the package managers listed above, or open a Terminal and type sudo apt-get install gdebi.
Once you have installed GDebi, use the File Browser to find the package you wish to install. Package files will look similar to this:
Double-click the package to open it with GDebi. If all dependencies have been met for the selected package, simply click the ‘Install package’ button to install it. GDebi will warn you if there are unmet dependencies, which means that there’s dependencies that aren’t resolved in the repositories that you’re using.
Using dpkg to install packages
dpkg is a command-line tool used to install packages. To install a package with dpkg, open a Terminal and type the following:
Note: replace directory with the directory in which the package is stored and package_name with the filename of the package.
It is recommended that you read the dpkg manual page before using dpkg, as improper use may break the package management database. To view the manual page for dpkg, open a Terminal and type man dpkg.
Getting a list of recently installed packages
You can use the dpkg logs to discover recently installed packages; this is handy if you want to roll back some recent installations to a previous system state.
More detailed information on this can be found here.
Automatic updates: Update Manager
Ubuntu will automatically notify you when security updates and software upgrades are available. The Ubuntu Update Manager is a simple and easy to use application that helps users to keep their system software updated. Simply click the update icon (which will appear in the notification area), type in your super-user/administrator password and follow the instructions on-screen to download and install the updates.
Keeping up to date is important, as security fixes which protect your computer from harm are delivered in this way.
Installing packages without an Internet connection
Sometimes, an internet connection is unavailable to install programs.
It is possible to install programs without CDs or DVDs onto offline computers, using a simple USB key for example to transfer only the packages you need.
There are several methods to do this:
Use Keryx
Keryx is a portable, cross-platform package manager for APT-based (Ubuntu, Debian) systems. It provides a graphical interface for gathering updates, packages, and dependencies for offline computers. Keryx is free and open source. You can get Keryx here: https://launchpad.net/keryx
Use the Synaptic package download script
Short instructions:
- Launch Synaptic on the offline computer
- Mark the packages you wish to install
Select File->Generate package download script
Launch Synaptic and click on File->Add downloaded packages
Note: If you don’t have access to a PC with GNU/Linux or emulating/virtualizing GNU/Linux (Cygwin, VMware, VirtualBox, Qemu, etc), just open the script with a text editor and enter all the URLs you see in your browser to download the corresponding packages.
If you have all the necessary libraries and/or dependencies, the simplest way is of course to just download the .deb package you need, just as you would with a Windows installer, and double-click the package to install it with GDebi.
Use Offline apt-get update
If you can’t even select the packages on your offline PC because you can’t add the repository / update the package info, try this: AptGet/Offline/Repository
Basically, it consists in creating your own local repository, except that it won’t contain the packages themselves, only the dependency information.
The problem is that when you generate the package download list using this method, it will try to get the packages from your local repository and obviously fail.
The solution is to post-process the script by replacing the URLs with the correct one.
Assuming you created the local repository at «/home/username/repository» and got the different files from «http://archive.ubuntu.com/ubuntu/», this can easily be done with the following command:
or directly without creating a second script:
or simply with any text editor featuring search&replace.
Use apt-offline
apt-offline allows you to easily upgrade or install new packages on your offline PC, by using another online PC.
Источник