Bug#312942: asterisk package install croaks with various errors

Robert Lister Robert Lister <robl@lentil.org>, 312942@bugs.debian.org
Sat, 11 Jun 2005 00:55:55 +0100


Package: asterisk
Version: 1:1.0.7.dfsg.1-2
Severity: normal


Asterisk install (via aptittde or apt-get) is falling over when I try to install it with a 
variety of errors:

Here is the aptitude install:

Preconfiguring packages ...
Selecting previously deselected package libsqlite0.
(Reading database ... 26884 files and directories currently installed.)
Unpacking libsqlite0 (from .../libsqlite0_2.8.16-1_i386.deb) ...
Selecting previously deselected package libasound2.
Unpacking libasound2 (from .../libasound2_1.0.8-3_i386.deb) ...
Selecting previously deselected package libgsm1.
Unpacking libgsm1 (from .../libgsm1_1.0.10-13_i386.deb) ...
Selecting previously deselected package libpq3.
Unpacking libpq3 (from .../libpq3_7.4.7-6sarge1_i386.deb) ...
Selecting previously deselected package libpri1.
Unpacking libpri1 (from .../libpri1_1.0.7-1_i386.deb) ...
Selecting previously deselected package libspeex1.
Unpacking libspeex1 (from .../libspeex1_1.1.6-2_i386.deb) ...
Selecting previously deselected package libtonezone1.
Unpacking libtonezone1 (from .../libtonezone1_1%3a1.0.7-4.1_i386.deb) ...
Selecting previously deselected package libltdl3.
Unpacking libltdl3 (from .../libltdl3_1.5.6-6_i386.deb) ...
Selecting previously deselected package odbcinst1.
Unpacking odbcinst1 (from .../odbcinst1_2.2.4-11_i386.deb) ...
Selecting previously deselected package unixodbc.
Unpacking unixodbc (from .../unixodbc_2.2.4-11_i386.deb) ...
Selecting previously deselected package asterisk-sounds-main.
Unpacking asterisk-sounds-main (from .../asterisk-sounds-main_1%3a1.0.7.dfsg.1-2_all.deb) ...
Selecting previously deselected package asterisk-config.
Unpacking asterisk-config (from .../asterisk-config_1%3a1.0.7.dfsg.1-2_all.deb) ...
Selecting previously deselected package asterisk.
Unpacking asterisk (from .../asterisk_1%3a1.0.7.dfsg.1-2_i386.deb) ...
Setting up libsqlite0 (2.8.16-1) ...

Setting up libasound2 (1.0.8-3) ...

Setting up libgsm1 (1.0.10-13) ...

Setting up libpq3 (7.4.7-6sarge1) ...

Setting up libpri1 (1.0.7-1) ...

Setting up libspeex1 (1.1.6-2) ...

Setting up libtonezone1 (1.0.7-4.1) ...

Setting up libltdl3 (1.5.6-6) ...

Setting up odbcinst1 (2.2.4-11) ...

Setting up unixodbc (2.2.4-11) ...

Setting up asterisk-sounds-main (1.0.7.dfsg.1-2) ...
Setting up asterisk-config (1.0.7.dfsg.1-2) ...
Setting up asterisk (1.0.7.dfsg.1-2) ...
chmod: cannot access `/etc/asterisk/*': No such file or directory
dpkg: error processing asterisk (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 asterisk
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ack!  Something bad happened while installing packages.  Trying to recover:
Setting up asterisk (1.0.7.dfsg.1-2) ...
chmod: cannot access `/etc/asterisk/*': No such file or directory
dpkg: error processing asterisk (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 asterisk
Press return to continue.


And apt-get (re-)installs fail but not with the same error consistently:


tigger:/home/robl# apt-get install asterisk
Reading Package Lists... Done
Building Dependency Tree... Done
Suggested packages:
  gnomemeeting ohphone kphone asterisk-doc asterisk-dev rate-engine
The following NEW packages will be installed:
  asterisk
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/1175kB of archives.
After unpacking 3289kB of additional disk space will be used.
Selecting previously deselected package asterisk.
(Reading database ... 27396 files and directories currently installed.)
Unpacking asterisk (from .../asterisk_1%3a1.0.7.dfsg.1-2_i386.deb) ...
Setting up asterisk (1.0.7.dfsg.1-2) ...
chown: cannot access `/var/spool/asterisk': No such file or directory
dpkg: error processing asterisk (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 asterisk
E: Sub-process /usr/bin/dpkg returned an error code (1)


Asterisk does not appear to start correctly.

tigger:/var/log# /etc/init.d/asterisk start
Starting Asterisk PBX: asterisk.
tigger:/var/log# ps xau | grep asterisk
root     11995  0.0  0.2  1820  572 pts/3    S+   00:45   0:00 grep asterisk


tigger:/etc/asterisk# apt-get install asterisk-config
Reading Package Lists... Done
Building Dependency Tree... Done
asterisk-config is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up asterisk (1.0.7.dfsg.1-2) ...
chmod: cannot access `/etc/asterisk/*': No such file or directory
dpkg: error processing asterisk (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 asterisk
E: Sub-process /usr/bin/dpkg returned an error code (1)


Tried un-unstalling and re-installing a few times, and manually adding the user and changing
the directory permissions so that they are owned by asterisk (the first install put them as
"root") but the best I can seem to do is a tempremental asterisk install that does not seem
to work well with previously working config (sip.conf and extensions.conf. It registers with
the sip providers but does not seem to allow phones to log on locally, also it locked up a
few times when I tried "reload" etc.)

Nothing obvious in the logs.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-386
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages asterisk depends on:
ii  asterisk-config         1:1.0.7.dfsg.1-2 config files for asterisk
ii  asterisk-sounds-main    1:1.0.7.dfsg.1-2 sound files for asterisk
ii  libasound2              1.0.8-3          ALSA library
ii  libc6                   2.3.2.ds1-22     GNU C Library: Shared libraries an
ii  libgsm1                 1.0.10-13        Shared libraries for GSM speech co
ii  libncurses5             5.4-4            Shared libraries for terminal hand
ii  libnewt0.51             0.51.6-20        Not Erik's Windowing Toolkit - tex
ii  libpq3                  7.4.7-6sarge1    PostgreSQL C client library
ii  libpri1                 1.0.7-1          Primary Rate ISDN specification li
ii  libspeex1               1.1.6-2          The Speex Speech Codec
ii  libsqlite0              2.8.16-1         SQLite shared library
ii  libssl0.9.7             0.9.7e-3         SSL shared libraries
ii  libtonezone1            1:1.0.7-4.1      tonezone library (runtime)
ii  unixodbc                2.2.4-11         ODBC tools libraries
ii  zlib1g                  1:1.2.2-4        compression library - runtime

-- debconf-show failed