Difference between revisions of "Tutorials and How-tos/Install Debian Packages"
Dmitri Popov (talk | contribs) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This howto tells you howto install packages from the Debian repositories. Available packages can be found here: [http://packages.debian.org/oldstable/ http://packages.debian.org/oldstable/ ]<br> | This howto tells you howto install packages from the Debian repositories. Available packages can be found here: [http://packages.debian.org/oldstable/ http://packages.debian.org/oldstable/ ]<br> | ||
First of all you have to log on to Bubba via ssh and become root.<br> | First of all you have to log on to Bubba via ssh and become root.<br> | ||
The standard Debian sources are per default enabled. Edit the file /etc/apt/sources.list if you need other sources. You could use nano to do this ie <br> | The standard Debian sources are per default enabled. Edit the file /etc/apt/sources.list if you need other sources. You could use nano to do this ie <br> | ||
<pre>nano /etc/apt/sources.list | <pre>nano /etc/apt/sources.list | ||
</pre> | </pre> | ||
After editing the sources file you need to tell the package manager that the file have changed: | After editing the sources file you need to tell the package manager that the file have changed: | ||
<pre>apt-get update | <pre>apt-get update | ||
</pre> | </pre> | ||
Now to the installation of packages! For example you want to install python. Use the command apt-get:<br> | Now to the installation of packages! For example you want to install python. Use the command apt-get:<br> | ||
<pre>apt-get install python | <pre>apt-get install python | ||
</pre> | </pre> | ||
You will be prompted with questions which in most cases could be answered with the yes. If asked for password, just hit enter.<br> | You will be prompted with questions which in most cases could be answered with the yes. If asked for password, just hit enter.<br> | ||
If did edit the sources file, you should always restore the file to its original state. Otherwise future upgrades via the web interface will most likely fail.<br> | If did edit the sources file, you should always restore the file to its original state. Otherwise future upgrades via the web interface will most likely fail.<br> | ||
All done!<br> | All done!<br> | ||
If you want to remove a package: | |||
<pre>apt-get remove python</pre> | |||
Besides apt-get, there's "apt-cache" and "dpkg" which have lots of options to search for or show information on packages you have or have not installed. | |||
For example, suppose that you want to reminisce about the good old days of the Atari 2600. You want to use APT to install an Atari emulator, and then download some games. You can do: | |||
<pre>apt-cache search atari</pre> | |||
Another option is 'show': | |||
<pre>apt-cache show mpg123</pre> | |||
This shows package information about a package named "mpg123". It will display things such as the package dependancies, the long description, the version, the installed size, etc.<br> | |||
More detailed options can be obtained here: http://[[www.ccl.net/cca/software/UNIX/updating-redhat/apt-howto/how-to-use-apt-cache.html]] | |||
Or use this on the command line: | |||
<pre>man apt-cache</pre> | |||
<br> |
Latest revision as of 13:50, 4 September 2010
This howto tells you howto install packages from the Debian repositories. Available packages can be found here: http://packages.debian.org/oldstable/
First of all you have to log on to Bubba via ssh and become root.
The standard Debian sources are per default enabled. Edit the file /etc/apt/sources.list if you need other sources. You could use nano to do this ie
nano /etc/apt/sources.list
After editing the sources file you need to tell the package manager that the file have changed:
apt-get update
Now to the installation of packages! For example you want to install python. Use the command apt-get:
apt-get install python
You will be prompted with questions which in most cases could be answered with the yes. If asked for password, just hit enter.
If did edit the sources file, you should always restore the file to its original state. Otherwise future upgrades via the web interface will most likely fail.
All done!
If you want to remove a package:
apt-get remove python
Besides apt-get, there's "apt-cache" and "dpkg" which have lots of options to search for or show information on packages you have or have not installed.
For example, suppose that you want to reminisce about the good old days of the Atari 2600. You want to use APT to install an Atari emulator, and then download some games. You can do:
apt-cache search atari
Another option is 'show':
apt-cache show mpg123
This shows package information about a package named "mpg123". It will display things such as the package dependancies, the long description, the version, the installed size, etc.
More detailed options can be obtained here: http://www.ccl.net/cca/software/UNIX/updating-redhat/apt-howto/how-to-use-apt-cache.html
Or use this on the command line:
man apt-cache