Installing Asterisk in Rocky Linux 9.2

Hi Forum!

I tried to install Asterisk, and one of the steps is installing “Development Tools”. But the response is “is not available”.

What can I do to fix that?

Best,
Mauro

I can’t replicate your issue on both Rocky Linux 8 and 9.

[root@cm01 ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.8 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.8 (Green Obsidian)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2029-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
ROCKY_SUPPORT_PRODUCT_VERSION="8.8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"
[root@cm01 ~]# dnf group list | grep Development
   .NET Core Development
   RPM Development Tools
   Development Tools
[root@xmpp01 ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.2 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.2"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.2 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.2"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.2"
[root@xmpp01 ~]# dnf group list | grep Development
   Development Tools
   .NET Development
   RPM Development Tools
[root@xmpp01 ~]#

They are both installable on my systems.

1 Like

I got it!

Now, when I put “make menuselect”, it has an error. This tool requires the ‘libxml2’ package, I tried to install, but it has already installed.

Sincerely,
Mauro

[el9]$ dnf list libxml2\*
Installed Packages
libxml2.x86_64                     2.9.13-3.el9_2.1               @baseos   
libxml2-devel.x86_64               2.9.13-3.el9_2.1               @appstream
Available Packages
libxml2.i686                       2.9.13-3.el9_2.1               baseos    
libxml2-devel.i686                 2.9.13-3.el9_2.1               appstream

The libxml2, like most libraries, is in two packages.
The libxml2 package offers the shared object for dynamic linker to use on runtime.
The libxml2-devel package offers the the headers, etc that are needed for building (compile and link) executables.

Do you have both installed (like in my output)?


The libxml2-devel is a member of group Platform Development:

[el9]$ dnf rq --groupmember libxml2-devel.x86_64
libxml2-devel-2.9.13-3.el9_1.x86_64
libxml2-devel-2.9.13-3.el9_2.1.x86_64
  @platform-devel

[el9]$ dnf group info platform-devel
Last metadata expiration check: 2:43:56 ago on Mon 11 Sep 2023 06:21:55 AM EEST.
Group: Platform Development
 Description: Recommended development headers and libraries for developing applications to run on AlmaLinux.
 Mandatory Packages:
   ...

The Platform Development is a different, complementary set of packages from Development Tools.
See dnf group info "Development Tools" for the latter.


The groups are convenience lists of packages of some theme. Some of the groups are not shown by the plain dnf group list; there is option --hidden. For example, on AlmaLinux 9:

[el9]$ dnf group list --hidden | grep Development
   Development Tools
   RPM Development Tools
   Platform Development
   .NET Development
   Additional Development
   Java Development


[el9]$ dnf group list --hidden | grep Development | while read GN ; do dnf -v group info "${GN}" | grep -B2 Description ; done
Group: Development Tools
 Group-Id: development
 Description: A basic development environment.
Group: RPM Development Tools
 Group-Id: rpm-development-tools
 Description: Tools used for building RPMs, such as rpmbuild.
Group: Platform Development
 Group-Id: platform-devel
 Description: Recommended development headers and libraries for developing applications to run on AlmaLinux.
Group: .NET Development
 Group-Id: dotnet
 Description: Tools to develop and/or run .NET applications
Group: Additional Development
 Group-Id: additional-devel
 Description: Additional development headers and libraries for building open-source applications.
Group: Java Development
 Group-Id: java-development
 Description: Support for developing programs in the Java programming language.

More important question is: Do you really have to build from sources?
Is there no RPM package for that application?
If not, does for example Fedora have it? If yes, then a rebuild from source RPM would be better than from plain sources. (The mock build tool can install required packages.)

PS. Guideline: Never build as root; compiler does not need admin privileges.

2 Likes

@mauro19 Is this the procedure you are using? :

https://docs.rockylinux.org/guides/communications/asterisk_installation/

If so, and you find issues, can you let me know?

Thanks,
Steve

@jlehtone thank you for your reply.

@sspencerwire yes, I used it. But, I found issues. For example:

  • dnf config-manager --set-enabled powertools → Error: No matching repo to modify: powertools.
    I need to configure a script in file /etc/yum.repos.d/rocky-PowerTools.repo. I think that line is not necessary.
  • make config → make: *** [Makefile:917: config] Error 127.
    Before that, I need to put “dnf install chkconfig” and the error disappears.

Finally, after reboot, and I want to access the Asterisk console, the messages is “Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)”.

I’ve installed with the next procedure:
vi /etc/selinux/config
selinux=disabled
systemctl stop firewalld && systemctl disable firewalld
dnf install epel-release
dnf config-manager --set-enabled crb
dnf group install “Development Tools”
cd /usr/src
dnf -y install wget
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz
tar xvfz asterisk-20-current.tar.gz
cd asterisk-20.4.0/
dnf install -y initscripts svn chkconfig
./contrib/scripts/get_mp3_source.sh
contrib/scripts/install_prereq install
./configure --libdir=/usr/lib64 --with-jansson-bundled
make menuselect
make
make install
make samples
make basic-pbx
make config
ldconfig
reboot
asterisk -r

I think it’s more effective, but I want to continue testing.

Sincerely,
Mauro

Just like @nazunalika , I can’t duplicate your error. This command works as expected for me.

Thanks,
Steve

Red Hat has Linux CodeReady Builder. For legal reasons the name of that repo differs in Rocky.

  • Rocky 8 has powertools
  • Rocky 9 has crb

For that reason one cannot enable “powertools” in Rocky 9.

1 Like

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