I'm trying to get Asterisk to build and having big problems.
I'm pretty rusty at using Linux, so I've probably made some mistakes...
(Several years ago, I built ffmpeg "from scratch" and had to install lots of modules on a dedicated server before it would build. I got it built, running, and doing some pretty great things for audio and video podcasts. So...I have some related experience, just not recently.)
I'm working on a VirtualMachine on a server hosted elsewhere.
Operating System: CentOS 7
Initially, the VM was running the 3.10.0-862.3.2.el7.x86_64 kernel
First, I did sudo bash to become root. I did that before installing a lot of other modules on this Virtual Machine...
Pretty much everything is owned by root.
Following these instructions:
https://wiki.asterisk.org/wiki/displ...stalling+DAHDI
I've downloaded dahdi-linux-complete-current.tar.gz, libpri-current.tar.gz, and asterisk-14-current.tar.gz into /usr/src
I've run:
tar -zxvf libpri-current.tar.gz
tar -zxvf dahdi-linux-complete-2.X.Y+2.X.Y.tar.gz
tar -zxvf asterisk-14-current.tar.gz
So, I have the source-code folders for the builds.
Now I need to build and install DAHDI (can't install libpri without it because of dependencies)
So...
cd /usr/src/dahdi-linux-complete-2.11.1+2.11.1
make
Fails with this:
You do not appear to have the sources for the 4.16.11-1.el7.elrepo.x86_64 kernel installed.
Previously, I had been running the 3.10.0-862.3.2.el7.x86_64 kernel and had gotten the error
You do not appear to have the sources for the 3.10.0-862.3.2.el7.x86_64 kernel installed.
So I tried installing the latest (as of that day) kernel, which was 4.16.11-1.el7.elrepo.x86_64, in the (false?) hope that it would put the source files in /usr/src/kernels. It didn't. But after a reboot, it's running the newer kernel.
Currently,
uname -r gives me:
4.16.11-1.el7.elrepo.x86_64
uname -a gives me:
Linux ip-192-168-100-8.us-east-2.compute.internal 4.16.11-1.el7.elrepo.x86_64 #1 SMP Tue May 22 15:34:16 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
In /usr/src/kernels, ls gives me:
3.10.0-862.3.2.el7.x86_64
That looks to me like source code for the 3.10.0-862.3.2.el7.x86_64 kernel. (Is that correct?)
Doing "ls -l" in /usr/libs/modules gives me:
drwxr-xr-x 7 root root 4096 Jan 4 15:31 3.10.0-693.11.6.el7.x86_64
drwxr-xr-x. 7 root root 4096 Nov 27 22:12 3.10.0-693.5.2.el7.x86_64
drwxr-xr-x 7 root root 4096 May 24 19:52 3.10.0-862.3.2.el7.x86_64
drwxr-xr-x 7 root root 4096 May 25 20:32 4.16.11-1.el7.elrepo.x86_64
drwxr-xr-x 7 root root 4096 May 27 17:35 4.16.12-1.el7.elrepo.x86_64
I think that that means all four of those kernels have been built. Is that true?
Hindsight being oh-so-useful, I decided to add /usr/src/kernels to the PATH
echo $PATH reports:
/root/perl5/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/src/kernels
The problem is still that I don't have the kernel sources for 4.16.11-1.el7.elrepo.x86_64 anywhere that the make utility can find them when attempting to build DAHDI.
I've Googled for hours looking for a solution to the missing-sources problem and come up empty. Oh, sure, there were plenty of suggested fixes. I've tried them all without success.
Is it possible to change back to running the 3.10.0-862.3.2.el7.x86_64 kernel so that it would match up with the sources in /usr/src/kernels?
Or is there a way to copy the 4.16.11-1.el7.elrepo.x86_64 from SOMEWHERE into /usr/src/kernels?
Getting DADHDI to build is the 1st hurdle. Hopefully, once that's done the rest will be more straightforward. I ultimately need Asterisk installed and working so that we can build and run VICIdial.
This quote from
http://asteriskfaqs.org seems to sum up the problem: "You need to make sure the kernel and kernel-devel packages are the same versions, and that you are running from the same kernel too (make sure you rebooted after any update of the kernel)."
Any help would be greatly appreciated.