安装 kamailio 时出错

安装 kamailio 时出错

我在安装 kamailio 时遇到了问题,我尝试使用 apt install 来安装它,但一直显示以下错误


sudo apt install kamailio kamailio-mysql-modules
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apache2-data apache2-utils
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  kamailio-berkeley-modules kamailio-carrierroute-modules kamailio-cpl-modules kamailio-ldap-modules kamailio-lua-modules kamailio-mono-modules kamailio-perl-modules kamailio-postgres-modules
  kamailio-presence-modules kamailio-python-modules kamailio-radius-modules kamailio-redis-modules kamailio-snmpstats-modules kamailio-unixodbc-modules kamailio-xml-modules kamailio-xmpp-modules
  stun-server | turn-server
The following NEW packages will be installed:
  kamailio kamailio-mysql-modules
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,859 kB of archives.
After this operation, 20.7 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 kamailio amd64 4.3.4-1.1ubuntu2 [6,772 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/universe amd64 kamailio-mysql-modules amd64 4.3.4-1.1ubuntu2 [87.8 kB]                                                                                       
Fetched 6,859 kB in 28s (240 kB/s)                                                                                                                                                                         
Selecting previously unselected package kamailio.
(Reading database ... 249000 files and directories currently installed.)
Preparing to unpack .../kamailio_4.3.4-1.1ubuntu2_amd64.deb ...
Unpacking kamailio (4.3.4-1.1ubuntu2) ...
Selecting previously unselected package kamailio-mysql-modules:amd64.
Preparing to unpack .../kamailio-mysql-modules_4.3.4-1.1ubuntu2_amd64.deb ...
Unpacking kamailio-mysql-modules:amd64 (4.3.4-1.1ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu17) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.7.5-1) ...
Setting up kamailio (4.3.4-1.1ubuntu2) ...
Job for kamailio.service failed because the control process exited with error code. See "systemctl status kamailio.service" and "journalctl -xe" for details.
invoke-rc.d: initscript kamailio, action "start" failed.
● kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server
   Loaded: loaded (/etc/systemd/system/kamailio.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2017-07-28 11:37:22 IST; 24ms ago
  Process: 5293 ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP (code=exited, status=255)

Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: Starting Kamailio (OpenSER) - the Open Source SIP Server...
Jul 28 11:37:22 coditas-Vostro-3446 kamailio[5293]: ERROR: loading config file(/usr/local/kamailio-4.4/etc/kamailio/kamailio.cfg): No such file or directory
Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: kamailio.service: Control process exited, code=exited status=255
Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server.
Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: kamailio.service: Unit entered failed state.
Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: kamailio.service: Failed with result 'exit-code'.
dpkg: error processing package kamailio (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of kamailio-mysql-modules:amd64:
 kamailio-mysql-modules:amd64 depends on kamailio (= 4.3.4-1.1ubuntu2); however:
  Package kamailio is not configured yet.

dpkg: error processing package kamailio-mysql-modules:amd64 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu9) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 kamailio
 kamailio-mysql-modules:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

有时我们会遇到依赖问题。最好手动编译。我已遵循此链接安装 kamailio。看看这个,它对我有用。

相关内容