help with installing perl module WWW::Curl::Easy

coffeeboyuk

Well-Known Member
Nov 12, 2005
60
3
158
Hi,

I'm not sure if this is the right section but is there an Easy patch to install WWW::Curl::Easy because trying to install it failed and it requires a dependency called curl-config.

I tried to install the perl module WWW::Curl::Easy on my server in the perl module section and it gave the following error message:

====================================

Checking C compiler....C compiler (/usr/bin/gcc) OK (cached Tue Jul 7 02:23:15 2020)
Tuned C compiler not available because it is not enabled....Done
Method: Using cpanminus
--> Working on WWW::Curl::Easy
Fetching http://www.cpan.org/authors/id/S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz ... OK
WWW-Curl-4.17/
WWW-Curl-4.17/LICENSE
WWW-Curl-4.17/META.yml
WWW-Curl-4.17/typemap
WWW-Curl-4.17/template/
WWW-Curl-4.17/template/Easy.pm.tmpl
WWW-Curl-4.17/template/Share.pm.tmpl
WWW-Curl-4.17/lib/
WWW-Curl-4.17/lib/WWW/
WWW-Curl-4.17/lib/WWW/Curl/
WWW-Curl-4.17/lib/WWW/Curl/Form.pm
WWW-Curl-4.17/lib/WWW/Curl/Multi.pm
WWW-Curl-4.17/lib/WWW/Curl/Easy.pm
WWW-Curl-4.17/lib/WWW/Curl/Share.pm
WWW-Curl-4.17/lib/WWW/Curl.pm
WWW-Curl-4.17/README.Win32
WWW-Curl-4.17/Curl.xs
WWW-Curl-4.17/Makefile.PL
WWW-Curl-4.17/MANIFEST
WWW-Curl-4.17/inc/
WWW-Curl-4.17/inc/Module/
WWW-Curl-4.17/inc/Module/Install.pm
WWW-Curl-4.17/inc/Module/Install/
WWW-Curl-4.17/inc/Module/Install/MakeMaker.pm
WWW-Curl-4.17/inc/Module/Install/Metadata.pm
WWW-Curl-4.17/inc/Module/Install/External.pm
WWW-Curl-4.17/inc/Module/Install/Base.pm
WWW-Curl-4.17/inc/Module/Install/Makefile.pm
WWW-Curl-4.17/inc/Module/Install/Can.pm
WWW-Curl-4.17/t/
WWW-Curl-4.17/t/06http-post.t
WWW-Curl-4.17/t/07ftp-upload.t
WWW-Curl-4.17/t/17slist.t
WWW-Curl-4.17/t/21write-to-scalar.t
WWW-Curl-4.17/t/symbols-in-versions
WWW-Curl-4.17/t/05progress.t
WWW-Curl-4.17/t/19multi.t
WWW-Curl-4.17/t/pod.t
WWW-Curl-4.17/t/15duphandle-callback.t
WWW-Curl-4.17/t/10errbuf.t
WWW-Curl-4.17/t/02callbacks.t
WWW-Curl-4.17/t/pod-coverage.t
WWW-Curl-4.17/t/14duphandle.t
WWW-Curl-4.17/t/18twinhandles.t
WWW-Curl-4.17/t/04abort-test.t
WWW-Curl-4.17/t/new/
WWW-Curl-4.17/t/new/07errbuf.t
WWW-Curl-4.17/t/new/08duphandle.t
WWW-Curl-4.17/t/new/06http-post.t
WWW-Curl-4.17/t/new/03body-callback.t
WWW-Curl-4.17/t/new/04abort.t
WWW-Curl-4.17/t/new/02header-callback.t
WWW-Curl-4.17/t/new/05progress.t
WWW-Curl-4.17/t/new/10multi-callback.t
WWW-Curl-4.17/t/new/09duphandle-callback.t
WWW-Curl-4.17/t/new/README
WWW-Curl-4.17/t/new/01basic.t
WWW-Curl-4.17/t/new/00constants.t
WWW-Curl-4.17/t/meta.t
WWW-Curl-4.17/t/09times.t
WWW-Curl-4.17/t/08ssl.t
WWW-Curl-4.17/t/20undefined_subs.t
WWW-Curl-4.17/t/01basic.t
WWW-Curl-4.17/t/13slowleak.t
WWW-Curl-4.17/t/16formpost.t
WWW-Curl-4.17/t/00constants.t
WWW-Curl-4.17/README
WWW-Curl-4.17/Changes
Configuring WWW-Curl-4.17 ... Locating required external dependency bin:curl-config... missing.
Unresolvable missing external dependency.
Please install 'curl-config' seperately and try again.
N/A
cpanminus failed with non-zero exit status: 1

All available perl module install methods have failed


====================================

How do I install curl-config? Do I type in curl-config as root to install this and then I can install the above perl module?

Kind regards,

L
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
I believe you actually want the libcurl-devel package for this.

Code:
[root@server ~]# rpm -ql libcurl-devel |grep curl-config
/usr/bin/curl-config
/usr/share/man/man1/curl-config.1.gz
 

coffeeboyuk

Well-Known Member
Nov 12, 2005
60
3
158
I believe you actually want the libcurl-devel package for this.

Code:
[root@server ~]# rpm -ql libcurl-devel |grep curl-config
/usr/bin/curl-config
/usr/share/man/man1/curl-config.1.gz
Hi Lauren,

Can I install libcurl-devel via "Install an RPM" on WHM? Is that the same thing as your command line?

Also, last night I found a webpage that said just do this:

centOS: yum install curl-config

Is that the same as your line of codes?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
Hello,


On the CLI you would do:

Code:
yum -y install libcurl-devel
curl-config is a part of this package and not present in the CentOS base repository separately so you wouldn't be able to just install it.

You can also use the WHM>>Software>>Install an RPM UI to do this and libcurl-devel is present.
 
  • Like
Reactions: coffeeboyuk

coffeeboyuk

Well-Known Member
Nov 12, 2005
60
3
158
Hello,


On the CLI you would do:

Code:
yum -y install libcurl-devel
curl-config is a part of this package and not present in the CentOS base repository separately so you wouldn't be able to just install it.

You can also use the WHM>>Software>>Install an RPM UI to do this and libcurl-devel is present.
Thanks for the explanation. I used that last yum command and then installed the perl moduled and it has worked.
 
  • Like
Reactions: cPanelLauren

coffeeboyuk

Well-Known Member
Nov 12, 2005
60
3
158
Hi,

I just installed AlmaLinux v8.8.0 because CPANEL says CENTOS 7 is depreciating in 2024, and following the instructions here no longer applies. I used the command line
"yum -y install libcurl-devel" and the proceed to installing Perl Module "WWW::Curl" and I still get the following error that the module isn't installed.

What do I need to do to get this perl module installed?

Please help!

Checking C compiler....C compiler (/usr/bin/gcc) OK (cached Sat Jul 8 04:30:22 2023)
Tuned C compiler not available because it is not enabled....Done
Method: Using cpanminus
--> Working on WWW::Curl
Fetching http://www.cpan.org/authors/id/S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz ... OK
WWW-Curl-4.17/
WWW-Curl-4.17/LICENSE
WWW-Curl-4.17/META.yml
WWW-Curl-4.17/typemap
WWW-Curl-4.17/template/
WWW-Curl-4.17/template/Easy.pm.tmpl
WWW-Curl-4.17/template/Share.pm.tmpl
WWW-Curl-4.17/lib/
WWW-Curl-4.17/lib/WWW/
WWW-Curl-4.17/lib/WWW/Curl/
WWW-Curl-4.17/lib/WWW/Curl/Form.pm
WWW-Curl-4.17/lib/WWW/Curl/Multi.pm
WWW-Curl-4.17/lib/WWW/Curl/Easy.pm
WWW-Curl-4.17/lib/WWW/Curl/Share.pm
WWW-Curl-4.17/lib/WWW/Curl.pm
WWW-Curl-4.17/README.Win32
WWW-Curl-4.17/Curl.xs
WWW-Curl-4.17/Makefile.PL
WWW-Curl-4.17/MANIFEST
WWW-Curl-4.17/inc/
WWW-Curl-4.17/inc/Module/
WWW-Curl-4.17/inc/Module/Install.pm
WWW-Curl-4.17/inc/Module/Install/
WWW-Curl-4.17/inc/Module/Install/MakeMaker.pm
WWW-Curl-4.17/inc/Module/Install/Metadata.pm
WWW-Curl-4.17/inc/Module/Install/External.pm
WWW-Curl-4.17/inc/Module/Install/Base.pm
WWW-Curl-4.17/inc/Module/Install/Makefile.pm
WWW-Curl-4.17/inc/Module/Install/Can.pm
WWW-Curl-4.17/t/
WWW-Curl-4.17/t/06http-post.t
WWW-Curl-4.17/t/07ftp-upload.t
WWW-Curl-4.17/t/17slist.t
WWW-Curl-4.17/t/21write-to-scalar.t
WWW-Curl-4.17/t/symbols-in-versions
WWW-Curl-4.17/t/05progress.t
WWW-Curl-4.17/t/19multi.t
WWW-Curl-4.17/t/pod.t
WWW-Curl-4.17/t/15duphandle-callback.t
WWW-Curl-4.17/t/10errbuf.t
WWW-Curl-4.17/t/02callbacks.t
WWW-Curl-4.17/t/pod-coverage.t
WWW-Curl-4.17/t/14duphandle.t
WWW-Curl-4.17/t/18twinhandles.t
WWW-Curl-4.17/t/04abort-test.t
WWW-Curl-4.17/t/new/
WWW-Curl-4.17/t/new/07errbuf.t
WWW-Curl-4.17/t/new/08duphandle.t
WWW-Curl-4.17/t/new/06http-post.t
WWW-Curl-4.17/t/new/03body-callback.t
WWW-Curl-4.17/t/new/04abort.t
WWW-Curl-4.17/t/new/02header-callback.t
WWW-Curl-4.17/t/new/05progress.t
WWW-Curl-4.17/t/new/10multi-callback.t
WWW-Curl-4.17/t/new/09duphandle-callback.t
WWW-Curl-4.17/t/new/README
WWW-Curl-4.17/t/new/01basic.t
WWW-Curl-4.17/t/new/00constants.t
WWW-Curl-4.17/t/meta.t
WWW-Curl-4.17/t/09times.t
WWW-Curl-4.17/t/08ssl.t
WWW-Curl-4.17/t/20undefined_subs.t
WWW-Curl-4.17/t/01basic.t
WWW-Curl-4.17/t/13slowleak.t
WWW-Curl-4.17/t/16formpost.t
WWW-Curl-4.17/t/00constants.t
WWW-Curl-4.17/README
WWW-Curl-4.17/Changes
Configuring WWW-Curl-4.17 ... Locating required external dependency bin:curl-config... found at /bin/curl-config.
The version is libcurl 7.61.1
Found curl.h in /usr/include/curl/curl.h
Building curlopt-constants.c for your libcurl version
Building Easy.pm constants for your libcurl version
Building Share.pm constants for your libcurl version
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for WWW::Curl
Writing MYMETA.yml and MYMETA.json
OK
Building WWW-Curl-4.17 ... cp lib/WWW/Curl/Form.pm blib/lib/WWW/Curl/Form.pm
cp lib/WWW/Curl/Multi.pm blib/lib/WWW/Curl/Multi.pm
cp lib/WWW/Curl.pm blib/lib/WWW/Curl.pm
cp lib/WWW/Curl/Easy.pm blib/lib/WWW/Curl/Easy.pm
cp lib/WWW/Curl/Share.pm blib/lib/WWW/Curl/Share.pm
Running Mkbootstrap for Curl ()
chmod 644 "Curl.bs"
"/usr/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Curl.bs blib/arch/auto/WWW/Curl/Curl.bs 644
"/usr/bin/perl" "-Iinc" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/ExtUtils/typemap' -typemap '/home/.cpanm/work/1688859491.3678/WWW-Curl-4.17/typemap' Curl.xs > Curl.xsc
mv Curl.xsc Curl.c
gcc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -DVERSION=\"4.17\" -DXS_VERSION=\"4.17\" -fPIC "-I/usr/lib64/perl5/CORE" Curl.c
FAIL
cpanminus failed with non-zero exit status: 1

All available perl module install methods have failed
 

sparek-3

Well-Known Member
Aug 10, 2002
2,183
285
388
cPanel Access Level
Root Administrator
I'm not sure what whm cpanel web page you are referring to, but as far as I know, cPanel switched to binary perl a long time ago.

The output you are showing is trying to compile the WWW::Curl module and it's not able to find something.

yum install perl-WWW-Curl

will install WWW::Curl as a binary from your AlmaLinux's repositories.
 

coffeeboyuk

Well-Known Member
Nov 12, 2005
60
3
158
I'm using cPanel Version 112.0.4.

If it can't find something does that mean AlmaLinux is buggy or CPANEL is buggy?

I went through the WHM Host to install it. Doesn't Cpanel install the binary version aswell?
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
963
437
363
cPanel Access Level
DataCenter Provider
Hello,

perl-WWW-Curl exists in AlmaLinux V8. You need to be careful to keep the exact capitalization etc. It does not matter if you install the package via CLI or "Install Distro Package" in WHM, they both use the OS's package manager to install the package. You're just looking to install a package that cPanel/WHM does not need by default.
 

coffeeboyuk

Well-Known Member
Nov 12, 2005
60
3
158
Hello,

perl-WWW-Curl exists in AlmaLinux V8. You need to be careful to keep the exact capitalization etc. It does not matter if you install the package via CLI or "Install Distro Package" in WHM, they both use the OS's package manager to install the package. You're just looking to install a package that cPanel/WHM does not need by default.
How do I get WWW-Curl to work?

I have a script that I run and it says it's missing WWW-Curl, and when I check in cPanel/WHM this perl module show's it's not installed.
 

coffeeboyuk

Well-Known Member
Nov 12, 2005
60
3
158
It looks like there is a big bug with CPANEL running on AlamLinux V8. I never had this problem with CENTOS 7. Hope CPANEL Staff can fix this ASAP!
 

sparek-3

Well-Known Member
Aug 10, 2002
2,183
285
388
cPanel Access Level
Root Administrator
What specific perl binary are you invoking in the script?

What perl is being referred to in the shebang line?

# cat /etc/redhat-release
AlmaLinux release 8.8 (Sapphire Caracal)

# /usr/bin/perl -MWWW::Curl -e ';'
Can't locate WWW/Curl.pm in @INC (you may need to install the WWW::Curl module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5).

# yum -y install perl-WWW-Curl

# /usr/bin/perl -MWWW::Curl -e ';'
#


Not really sure why you're trying to compile a module that can be installed from the AlmaLinux repositories.

Unless you are calling some funky version of perl.
 

coffeeboyuk

Well-Known Member
Nov 12, 2005
60
3
158
It seems the cpanel team have managed to install WWW-Curl because I managed to run my script, but WHM/CPANEL doesn't display the module in the list of installed perl modules. Being able to see what's perl modules installed can be quite handy.

The WHM/CPANEL is supposed to install it, if it doesn't there's a problem.

I'm not sure how they installed it but I bet they used the CLI interface and ran some command.

WHM/CPANEL is suppose to work effortlessy but it's not doing it's job and that's a problem! (It seems CPANEL on AlmaLinux is full of bugs)

Oh, forgot to mention in answer to your question, it's just bog standard simple script that requires www-curl.
 
Last edited:

sparek-3

Well-Known Member
Aug 10, 2002
2,183
285
388
cPanel Access Level
Root Administrator
I try to avoid using the WHM as much as possible, so it's very valid to say that I don't have a lot of ideas as to what is going on in the WHM.

If I had to guess, the whole "Install a Perl Module" system in the WHM is deprecated. Or at least abandoned to the point that it should be deprecated. There's really not a whole lot that goes on in pure perl any more in web hosting development. Most scripts are written in PHP these days. So I just really don't think there's a ton of focus on perl and perl modules by cPanel and the WHM interface.

Looking at the Install a Perl Module page in the WHM, it would appear to only be listing perl modules installed at /usr/local/share/perl5. Whereas, from the error message that I showed above, perl looks for modules in /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5, so a lot more places that just /usr/local/share/perl5.

When you yum -y install perl-WWW-Curl it installs the module in /usr/lib64/perl5/vendor_perl. Which is in the path that perl checks, but not in the path that the WHM Install a Perl Module page lists from. Why? I have no idea.

Why does the WHM Install a Perl Module try to compile the module? Well, it says so right there on the page Note: Modules are installed directly from the CPAN repository. But why not use a yum repository to install it? Again, I don't know. This all leads me to believe that the whole WHM Install a Perl Module system has been abandoned or at least not looked at by cPanel in several years.

When a particular section of a software suite is seldom used by the users, then that particular section becomes seldomly up kept by the developers of the software suite. That's just the way things are.
 
  • Like
Reactions: coffeeboyuk