LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-02-2017, 03:24 PM   #1
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542

Rep: Reputation: 79
How can I install String/Util.pm


Hi there,

How can I install String/Util.pm?

When I run one of my script I've got the following error:
Code:
Can't locate String/Util.pm in @INC (you may need to install the String::Util module)
I've already tried
Code:
cpan install String::Util
Thanks
 
Old 01-02-2017, 03:57 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by angel115 View Post
Hi there,
How can I install String/Util.pm?

When I run one of my script I've got the following error:
Code:
Can't locate String/Util.pm in @INC (you may need to install the String::Util module)
I've already tried
Code:
cpan install String::Util
Read the "Question Guidelines" link in my posting signature. You don't tell us what operating system you're using, what error(s)/message(s) you're getting when you run that cpan command, if you've even installed CPAN, or if you've tried downloading/installing the module from source, using the instructions that come with the tarball. Without details, we can't tell you anything.
 
Old 01-02-2017, 06:24 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
I'm rather surprised that this module isn't already there.

If you're dealing with your system-wide configuration, look for a package that you can install (from your distro vendor) to install the package.

On an individual setup, the cpan command is typically used to manage packages.
 
Old 01-03-2017, 03:24 AM   #4
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542

Original Poster
Rep: Reputation: 79
Hi TBOne,

I've using Linux (Ubuntu Server 16.04) with Perl v5.22.1
The error message I'm getting when I'm starting my script is in my original post.

On another hand the CPAN command end-up successfully, but I'm still getting the error message when I start my script.

Thanks for your help.
 
Old 01-03-2017, 06:03 AM   #5
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542

Original Poster
Rep: Reputation: 79
I have to appologys as after checking I notice that String::Util was not installed so I run again the installation cpan install String::Util

And I got an error (That I probably get the first time too, but I didn't watch close enough)
Here is the error:
Code:
# cpan install String::Util

Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/root/.cpan/Metadata'
  Database was generated on Mon, 02 Jan 2017 20:17:02 GMT
Running install for module 'String::Util'
Checksum for /root/.cpan/sources/authors/id/M/MI/MIKO/String-Util-1.26.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring M/MI/MIKO/String-Util-1.26.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Number::Misc 1.2 not found.
Warning: prerequisite Test::Toolbox 0.2 not found.
Generating a Unix-style Makefile
Writing Makefile for String::Util
Writing MYMETA.yml and MYMETA.json
  MIKO/String-Util-1.26.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for M/MI/MIKO/String-Util-1.26.tar.gz
---- Unsatisfied dependencies detected during ----
----       MIKO/String-Util-1.26.tar.gz       ----
    Test::Toolbox [requires]
    Number::Misc [requires]
Running install for module 'Test::Toolbox'
Checksum for /root/.cpan/sources/authors/id/M/MI/MIKO/Test-Toolbox-0.4.tar.gz ok
Configuring M/MI/MIKO/Test-Toolbox-0.4.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Test::Toolbox
Writing MYMETA.yml and MYMETA.json
  MIKO/Test-Toolbox-0.4.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for M/MI/MIKO/Test-Toolbox-0.4.tar.gz
  MIKO/Test-Toolbox-0.4.tar.gz
  make -- NOT OK
Running install for module 'Number::Misc'
Checksum for /root/.cpan/sources/authors/id/M/MI/MIKO/Number-Misc-1.2.tar.gz ok
Configuring M/MI/MIKO/Number-Misc-1.2.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Number::Misc
Writing MYMETA.yml and MYMETA.json
  MIKO/Number-Misc-1.2.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for M/MI/MIKO/Number-Misc-1.2.tar.gz
  MIKO/Number-Misc-1.2.tar.gz
  make -- NOT OK
  MIKO/String-Util-1.26.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/String-Util-1.26-9KQtUO
  MIKO/String-Util-1.26.tar.gz
  Has already been prepared
Running make for M/MI/MIKO/String-Util-1.26.tar.gz
Warning: Prerequisite 'Number::Misc => 1.2' for 'MIKO/String-Util-1.26.tar.gz' failed when processing 'MIKO/Number-Misc-1.2.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'Test::Toolbox => 0.2' for 'MIKO/String-Util-1.26.tar.gz' failed when processing 'MIKO/Test-Toolbox-0.4.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
  MIKO/String-Util-1.26.tar.gz
  make -- NOT OK
 
Old 01-03-2017, 06:36 AM   #6
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542

Original Poster
Rep: Reputation: 79
My mistake I didn't install the build-essential package

so after running
Code:
apt-get install build-essential
cpan install String::Util
Everything is working fine.

Thank you the 2 of you for your help.

Best regards,
Angel.
 
Old 01-05-2017, 08:57 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
It might be worth Googling topics such as "Installing Perl in Shared Hosting" to see how these various things can work.
  • "On the one hand, there are lots of fairly-exotic options available, if you need them."
  • "On the other hand, 'distro' authors try very hard to keep things easy for you, if you don't."
So it goes . . .

And, for what it's worth ... "very-similar technical issues 'pretty much come with the territory,'" no matter what language you might be dealing with. (In other words, "it's not just Perl ...")

Last edited by sundialsvcs; 01-05-2017 at 09:00 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in 'make install' of Util-linux-ng-2.16 LFS 6.5 Veena_Gecw Linux From Scratch 1 10-29-2012 02:19 PM
How to install yum-util for rhel 6.0 rahul.6sept Linux - Newbie 6 03-13-2012 08:22 AM
[SOLVED] Are the programs in util-linux the same version as those in util-linux-ng? harryhaller Slackware - Installation 2 10-07-2011 09:43 AM
[SOLVED] util-macros-1.9 install problem steviebob Slackware 4 08-15-2011 03:24 AM
How do I install util-linux-2.10o rdaves@earthlink.net Linux - Newbie 1 05-27-2001 09:28 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration