Home

Search this site:
 

Horshack’s
very
own site

 

This is Bavaria, Germany!
You will find links to Perl,
bootdisks for system administration,
a lot of Linux,
Windows administration
and some personal belongings.
Debian, commands to install software

apt-get, apt-cache - what to know

HTTP-Proxy for apt

apt-programs rely on environment variable for proxy-server, put this in /etc/profile:

http_proxy=http://your.proxy:3128
export http_proxy

Commands to install software with Debian

Query in stable area

apt-cache search perl

query for packages in testing, unstable

via Webinterface

Update the list of files in local repository

apt-get update

Install

apt-get install perl

Install from testing-area

apt-get install -t testing perl

Install a package from local directory

dpkg -i perl.deb

Delete a package

apt-get remove --purge perl

Information about a package not installed

apt-cache show perl

List of all installed packages

dpkg -l | grep ^ii

Install upgrades (not from testing/unstable!)

apt-get -y dist-upgrade

 

 

Cheatsheat for /etc/apt/sources.list

This is where apt-get tries to get the packages from

woody:
# stable
deb http://ftp.de.debian.org/debian woody main non-free contrib
deb http://ftp.de.debian.org/debian-non-US woody/non-US main non-free contrib
# Security-updates
deb http://security.debian.org/ stable/updates main contrib non-free
#
# additional lines for "testing, basis" area
#
deb http://ftp.de.debian.org/debian/ testing main non-free contrib
deb http://ftp.de.debian.org/debian-non-US testing/non-US main contrib non-free
#
# additional lines for "testing, updates" area
#
deb http://ftp.de.debian.org/debian/ testing-proposed-updates main non-free contrib
deb http://ftp.de.debian.org/debian-non-US testing-proposed-updates/non-US main contrib non-free
#
# additional lines for "unstable, basis" area (there are no updates here)
#
deb http://ftp.de.debian.org/debian/ unstable main non-free contrib
deb http://ftp.de.debian.org/debian-non-US unstable/non-US main contrib non-free
sarge:

# stable
deb http://ftp.at.debian.org/debian sarge main non-free contrib
deb http://ftp.at.debian.org/debian-non-US sarge/non-US main non-free
# Security-updates
deb http://security.debian.org/ stable/updates main contrib non-free

Not enough memory for Apt-files

If you get a failure while running apt-get update like this

This means that you reached your cache-limit. Put this line into /etc/apt/apt.conf (usually this file does not exist):

 Take packages from stable unless advised!

Usually you would like to take packages only from stable-branch. But if you have lines for testing and update in your sources.list you create a fence to jump over with the file /etc/pat/preferences:

# File /etc/apt/preferences
Package: *
Pin: release a=testing
Pin-Priority: 20

Package: *
Pin: release a=unstable
Pin-Priority: 20 

Nevertheless, you can install packages from other branches like that:

Get a list of all installed packages
and install all that in another system

Get a list:

Use that list to install it on another server

Install what is needed to compile perl-modules

This is what you need to self-compile perl-modules

# apt-get install build-essential
# apt-get install unzip

Install C-Compiler and everything needed to compile perl-modules

apt-get install build-essential
Impressum