2

I am working on install Coturn which is an open-source Stun and TURN server. For that, I had two options, one was to download the debian package and install it by gdebi, and other was to make the project manually. I went for the easier route, and unfortunately the package installation is failing.

Right now, even when I try to remove the package it fails : Is there any way I can remove this package and install it properly either via source or binary.

Output for purge :

coturn-master # apt-get purge coturn
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  coturn
0 upgraded, 0 newly installed, 1 to remove and 539 not upgraded.
1 not fully installed or removed.
After this operation, 1.234 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 51439 files and directories currently installed.)
Removing coturn ...
update-rc.d: error: cannot find a LSB script for coturn
dpkg: error processing coturn (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 coturn
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have the source package downloaded for coturn, but I cannot use that as dependencies are not satisfied, and whenver I try to manually fulfil the dependencies, coturn throws stones in path.. :-(

coturn-master # ./configure
ginstall: not found
install is /usr/bin/install
pkill is /usr/bin/pkill
sqlite3: not found
sqlite: not found
Use TMP dir /var/tmp
Compiler: cc
Library option -lsocket cannot be used
Library option -lwldap32 cannot be used
Library option -lwldap64 cannot be used
Library option -lintl cannot be used
Sockets code is fine: no sin_len field present
Ignore IP_RECVERR
Crypto SSL lib found.
SSL lib found.
Libevent2 development is not installed properly
ERROR: Libevent2 development libraries are not installed properly in required location.
ERROR: may be you have just too old libevent tool - then you have to upgrade it.
See the INSTALL file.
Abort.


coturn-master # apt-get install sqlite3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libc-bin libc-dev-bin libc-l10n libc6 libc6-dev libsqlite3-0 libsqlite3-dev locales oracle-java8-installer postgresql-9.1
  postgresql-9.4 postgresql-contrib-9.4
Suggested packages:
  glibc-doc sqlite3-doc binfmt-support visualvm ttf-baekmuk ttf-unfonts ttf-unfonts-core ttf-kochi-gothic ttf-sazanami-gothic
  ttf-kochi-mincho ttf-sazanami-mincho ttf-arphic-uming firefox firefox-2 iceweasel mozilla-firefox iceape-browser
  mozilla-browser epiphany-gecko epiphany-webkit epiphany-browser galeon midbrowser moblin-web-browser xulrunner xulrunner-1.9
  konqueror chromium-browser midori google-chrome locales-all libdbd-pg-perl
Recommended packages:
  postgresql-contrib-9.1 sysstat
The following packages will be REMOVED:
  coturn
The following NEW packages will be installed:
  libc-l10n sqlite3
The following packages will be upgraded:
  libc-bin libc-dev-bin libc6 libc6-dev libsqlite3-0 libsqlite3-dev locales oracle-java8-installer postgresql-9.1 postgresql-9.4
  postgresql-contrib-9.4
11 upgraded, 2 newly installed, 1 to remove and 528 not upgraded.
1 not fully installed or removed.
Need to get 0 B/19,3 MB of archives.
After this operation, 6.894 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 51439 files and directories currently installed.)
Removing coturn ...
update-rc.d: error: cannot find a LSB script for coturn
dpkg: error processing coturn (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 coturn
E: Sub-process /usr/bin/dpkg returned an error code (1)

Coturn requires SID branch, so I added this in source.list. Is that the reason it's trying to pull PostgreSQL-9.1. I don't want 9.1, I have 9.4 already.

sources.list :

deb     http://mirror.hetzner.de/debian/packages wheezy main contrib non-free
deb     http://mirror.hetzner.de/debian/security wheezy/updates main contrib non-free

deb     http://cdn.debian.net/debian/ wheezy main non-free contrib
deb-src http://cdn.debian.net/debian/ wheezy main non-free contrib

deb     http://security.debian.org/  wheezy/updates  main contrib non-free
deb-src http://security.debian.org/  wheezy/updates  main contrib non-free
// Below line I added. 
deb http://ftp.de.debian.org/debian sid main 

What can I do to remedy this problem. Thank you.

  • Would it be possible for you to upgrade to Debian 8 (Jessie)? – Stephen Kitt May 2 '16 at 8:59
  • @StephenKitt : It's our test-server. I wouldn't mind, but last time I tried to upgrade Debian, it nuked the entire OS, the admin had to reinstall. Tell me, will upgrading help with solving coturn installation? – We are Borg May 2 '16 at 9:00
  • It should help, yes: Jessie includes coturn in the distribution, and version 4.5.0.2 is available in Jessie backports. Could you edit your question to include the contents of /var/lib/dpkg/info/coturn.prerm? – Stephen Kitt May 2 '16 at 9:16
2

I was able to solve this problem by following commands :

mv /var/lib/dpkg/info/coturn.* /tmp/
dpkg --remove --force-remove-reinstreq coturn

This worked. And I installed coturn again, then it worked.

  • @AlexanderBatischev : SO says I can only accept my own answer in 2 days... Will do that then. Thank you. :-) – We are Borg May 2 '16 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.