Asterisk installation failure

Guys, I’m running red hat 7.7 and trying to install asterisk 13.17.1. I made install_prereq install and ./configure --with-pjproject-bundled, then make menuselect, setting resources for pjsip, when I execute make, I get following:
[CC] libasteriskpj.c -> libasteriskpj.o
[LD] libasteriskpj.o -> libasteriskpj.so.2
/bin/ld: cannot find -lsrtp-x86_64-unknown-linux-gnu
collect2: error: ld returned 1 exit status
make[1]: *** [libasteriskpj.so.2] Error 1
make: *** [main] Error 2

You may not have libsrtp-devel installed and possibly a couple of more libs. I’d recomment to call make menuconfig and enable only the stuff you really need. the prereq script is a bit outdated and not all packages are available in Centos 7 and 8 with standard repositories enabled.

1 Like

Hey @EkFudrek I unmarked in Resource Modules res_srtp, so when execute make, still getting the same,
/bin/ld: cannot find -lsrtp-x86_64-unknown-linux-gnu
collect2: error: ld returned 1 exit status
make[1]: *** [libasteriskpj.so.2] Error 1
make: *** [main] Error 2

Then I tryied to install libsrtp-devel, but it is already installed > Package libsrtp-devel-1.4.4-10.20101004cvs.el7.x86_64 already installed and latest version

Have you try fixing Asterisk package dependencies with the script

contrib /scripts/install_prereq install

1 Like

Hi @ambiorixg12 yeah, I tryied that. I ran it again, getting this output:
[root@vrt1947 scripts]# bash install_prereq install
Loaded plugins: enabled_repos_upload, package_upload, search-disabled-repos, subscription-manager
rhel-7-server-extras-rpms | 2.0 kB 00:00:00
rhel-7-server-optional-rpms | 1.8 kB 00:00:00
rhel-7-server-rpms | 2.0 kB 00:00:00
rhel-7-server-satellite-tools-6.4-rpms | 2.1 kB 00:00:00
No package spandsp-devel available.
No package freetds-devel available.
No package iksemel-devel available.
No package corosynclib-devel available.
No package libsqlite3x-devel available.
No package radiusclient-ng-devel available.
No package portaudio-devel available.
No package libresample-devel available.
No package gmime22-devel available.
No package sqlite2-devel available.
Package 1:mariadb-devel-5.5.64-1.el7.x86_64 already installed and latest version
No package jack-audio-connection-kit-devel available.
No package pjproject-devel available.
Nothing to do
Uploading Enabled Repositories Report
Loaded plugins: subscription-manager
#############################################

install completed successfully

#############################################
[root@vrt1947 asterisk-13.17.1]# make menuselect
CC=“cc” CXX=“g++” LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="–silent" makeopts
make[1]: Entering directory /usr/src/asterisk-13.17.1/menuselect' make[1]: makeopts’ is up to date.
make[1]: Leaving directory /usr/src/asterisk-13.17.1/menuselect' make[1]: Entering directory /usr/src/asterisk-13.17.1’
CC=“cc” CXX=“g++” LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="–silent" makeopts
make[2]: Entering directory /usr/src/asterisk-13.17.1/menuselect' make[2]: makeopts’ is up to date.
make[2]: Leaving directory /usr/src/asterisk-13.17.1/menuselect' menuselect changes saved! make[1]: Leaving directory /usr/src/asterisk-13.17.1’
[root@vrt1947 asterisk-13.17.1]# make
CC=“cc” CXX=“g++” LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="–silent" makeopts
make[1]: Entering directory /usr/src/asterisk-13.17.1/menuselect' make[1]: makeopts’ is up to date.
make[1]: Leaving directory `/usr/src/asterisk-13.17.1/menuselect’
[LD] libasteriskpj.o -> libasteriskpj.so.2
/bin/ld: cannot find -lsrtp-x86_64-unknown-linux-gnu
collect2: error: ld returned 1 exit status
make[1]: *** [libasteriskpj.so.2] Error 1
make: *** [main] Error 2

That script I have tested on Centos and Debian repo are not the same for redhat so script is failing installing packages

1 Like

After installing the required and wanted modules you also need to call the configure script again.

1 Like

You may want to ensure that you have the EPEL repository enabled, as that provides many of the development libraries that seem to be missing on your system.

1 Like

HI @jsmith, I’ve installed epel, then I start over the installation, but still getting the same message:

[root@vrt1947 asterisk-13.17.1]# rpm -qa epel-release
epel-release-7-12.noarch

[CC] libasteriskpj.c -> libasteriskpj.o
[LD] libasteriskpj.o -> libasteriskpj.so.2
/bin/ld: cannot find -lsrtp-x86_64-unknown-linux-gnu
collect2: error: ld returned 1 exit status
make[1]: *** [libasteriskpj.so.2] Error 1
make: *** [main] Error 2

@jsmith, I’ve just unmarked in make menuselect > Resource Modules > res_srtp, so I installed successfully now. Thank you all of you!

All the best!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.