Menu Close

How to install Asterisk on Debian – APT repository

Latest Asterisk packages we should install now directly into our Debian/Ubuntu servers using the apt-get tool. More info at


Instructions Options 1) (debian and Ubuntu)

First, we will import Asterisk project apt key:

apt-key adv --keyserver --recv-keys 175E41DF

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver --recv-keys 175E41DF
gpg: requesting key 175E41DF from hkp server
gpg: key 175E41DF: public key "Asterisk Packaging Team <>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
or, in a case of problems, do it manually
wget -O - | apt-key add -
Now we will edit apt sources, so add the lines to your /etc/apt/sources.list. Open the file witch your preferred editor, for example with vim 
vim /etc/apt/sources.list
and, depends on your debian distribution, which we may check this with
lsb_release -cs
 add lines (here for squeeze)
deb squeeze main
deb-src squeeze main


Instructions Options 2) (Ubuntu)

Install package used to manage package repositories using add-apt-repository command

apt-get install python-software-properties

now import Asterisk project apt key:

apt-key adv --keyserver --recv-keys 175E41DF

and run for Ubuntu

sudo add-apt-repository "deb `lsb_release -cs` main"
sudo add-apt-repository "deb-src `lsb_release -cs` main"

Update Package list 

In both cases we have to update local apt-get database running  apt-get update

Get:1 squeeze Release.gpg [490 B]
Ign squeeze/main Translation-en
Ign squeeze/main Translation-en_US
Get:2 squeeze Release [2,226 B]
Ign squeeze/main Sources
Ign squeeze/main i386 Packages
Get:3 squeeze/main Sources [1,525 B]
Get:4 squeeze/main i386 Packages [6,156 B]
Fetched 10.4 kB in 1s (9,382 B/s)
Reading package lists... Done
and check which version of the Asterisk server package exist there, for example, for stable version of debian squeeze it is asterisk 1.6, now it should be higher, we should find something like this:
apt-cache show asterisk

Package: asterisk
Version: 1:
Architecture: i386
Maintainer: Paul Belanger <>
Installed-Size: 9304
Now we may install main asterisk
apt-get install asterisk
or upgrade previous one.
Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.