[SOLVED] Installing libgd2-xpm-dev and build-essential in CentOS

5 posts / 0 new
Last post
#1 Sat, 11/14/2015 - 14:15
No Expert

[SOLVED] Installing libgd2-xpm-dev and build-essential in CentOS

Hi,

my manually created logwatch reports show these messages:

No Sys::CPU module installed.  To install, execute the command:
    perl -MCPAN -e 'install Sys::CPU'

No Sys::MemInfo module installed.  To install, execute the command:
    perl -MCPAN -e 'install Sys::MemInfo'

When I attempt to install Sys::CPU I get the following message:

[root@web ~]# perl -MCPAN -e 'install Sys::CPU'
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/Metadata'
  Database was generated on Sat, 14 Nov 2015 12:17:02 GMT
Running install for module 'Sys::CPU'
CPAN: Data::Dumper loaded ok (v2.124)
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for M/MZ/MZSANFORD/Sys-CPU-0.61.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
CPAN: Compress::Zlib loaded ok (v2.021)
Checksum for /root/.cpan/sources/authors/id/M/MZ/MZSANFORD/Sys-CPU-0.61.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.58)
Sys-CPU-0.61/
Sys-CPU-0.61/Changes
Sys-CPU-0.61/CPU.pm
Sys-CPU-0.61/CPU.xs
Sys-CPU-0.61/Makefile.PL
Sys-CPU-0.61/MANIFEST
Sys-CPU-0.61/META.json
Sys-CPU-0.61/META.yml
Sys-CPU-0.61/README
Sys-CPU-0.61/t/
Sys-CPU-0.61/t/Sys-CPU.t
CPAN: File::Temp loaded ok (v0.22)

  CPAN.pm: Going to build M/MZ/MZSANFORD/Sys-CPU-0.61.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Sys::CPU
Could not read '/root/.cpan/build/Sys-CPU-0.61-ew6qR4/META.yml'. Falling back to other methods to determine prerequisites
cp CPU.pm blib/lib/Sys/CPU.pm
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp  -typemap /usr/share/perl5/ExtUtils/typemap  CPU.xs > CPU.xsc && mv CPU.xsc CPU.c
Please specify prototyping behavior for CPU.xs (see perlxs manual)
gcc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION="0.61" -DXS_VERSION="0.61" -fPIC "-I/usr/lib64/perl5/CORE"   CPU.c
/bin/sh: gcc: command not found
make: *** [CPU.o] Error 127
  MZSANFORD/Sys-CPU-0.61.tar.gz
  /usr/bin/make -- NOT OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

Reading here: http://customerhelp.co.za/linux/ubuntu-security/logwatch-missing-cpu-mem... it suggests installing (for Ubuntu) libgd2-xpm-dev build-essential

I'm trying to get the equivalent for CentOs and I believe it's this:

yum install gd-devel
yum install make gcc gcc-c++ kernel-devel

Can someone please help / confirm?

Thank you

Sat, 11/14/2015 - 15:56
andreychek

Howdy,

The error that you're receiving above is that gcc is missing... it may just be a matter of installing the gcc package, and then re-attempt installing the Perl packages. The commands you mentioned do that, along with installing some related packages.

-Eric

Sat, 11/14/2015 - 16:58
No Expert

Hi and thanks for your reply.

I installed gcc and Sys::CPU worked. Sys::MemInfo complained about the lack of Test::More but I installed that too and it worked.

However, I was rather disappointed with the output in Logwatch:

--------------------- System Configuration Begin ------------------------

    CPU:     4 Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz at 3300MHz
    Memory:  2048 MB
    Machine: x86_64
    Release: Linux 2.6.32-042stab108.8

---------------------- System Configuration End ------------------------- 

I thought it would provide details about CPU and memory utilisation but instead it's just some system config details.

Do you know if Logwatch (or any other) is able to report CPU and memory utilisation?

Thank you

Mon, 11/16/2015 - 16:29
No Expert

Hi,

as mentioned above, I was a bit disappointed with the memory output of Logwatch, as I (wrongly) expected it to report memory usage, rather than memory available.

I know Logwatch can add reports of those services found in /usr/share/logwatch/scripts/services (e.g. pam, secure, iptables, syslogd). Does anyone know if any of those services report on memory usage?

Alternatively is there any easy way I can email myself the contents of, e.g. would something like this work or would it interfere with the system?

mail -s 'Memory Info' user@email.com < /proc/meminfo

or

free -m | mail -s 'Memory Info' user@email.com

Thanks

Mon, 11/16/2015 - 17:11
andreychek

Howdy,

I'm unfortunately not too familiar with logwatch... but you can certainly make your own script for emailing yourself the information you're after.

There's nothing wrong with using the two commands you shared.

-Eric

Topic locked