LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-19-2017, 12:07 PM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: Centos 7 , Linux Mint 18.1 Under VMware in Win7
Posts: 542

Rep: Reputation: 34
Missing Module from @INC


Greetings,

Can anyone help me with resolving the error below.

I need this fixed before I can run Clamtk in CentOS 7. (KDE or Shell)

I've tried just about everything I know of with my limited knowledge of linux. Already downloaded CPAN and tried to do an install of this but it doesn't know anything about JSON.pm

Can't locate JSON.pm in @INC (@INC contains:

Thanks
 
Old 06-19-2017, 12:25 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
Checking my RHEL7 system I see there is an RPM containing JSON.pm:

perl-JSON-2.59-2.el7.noarch

Since CentOS is a binary compile of RHEL source that same package should be available by running yum on your CentOS:

Code:
yum install perl-JSON
You may need to update your cache first as sometimes older cache won't list newer packages.
Code:
yum makecache fast

Also you might want to verify the perl you're running is the one you think you are. Default on RHEL7 is Perl 5.16. Earlier RHEL/CentOS had earlier upstream Perl Versions (5.8.8 on RHEL5, 5.10 on RHEL6). Some apps install their own copies of Perl or other tools that might not be compatible with the default system versions so you have to update those versions instead.

From this link is the suggestion:
Quote:
perl -MCPAN -e 'install JSON' using the path to the one you're using in your script. (Or change your script to point to the other binary)
 
Old 06-19-2017, 12:26 PM   #3
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
Try putting this at the beginning of your code:
Code:
BEGIN {
     push (@INC, "/directory/where/JSON.pm/is");
}
 
Old 06-19-2017, 12:38 PM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,636

Rep: Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614
Why did you open a new thread?
http://www.linuxquestions.org/questi...-a-4175608108/
Did you install that package?
 
Old 06-19-2017, 07:49 PM   #5
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: Centos 7 , Linux Mint 18.1 Under VMware in Win7
Posts: 542

Original Poster
Rep: Reputation: 34
First, thanks all for responding to the indicated issue.

I will try the relevant suggestions and get back with the results.

Second, Laserberk, This is an installed app (Clamtk) that I’m trying to get working, I’m not writing anything but thanks for the suggestion.

Third, Pan64, Posted the question here because there weren’t any relevant responses where the original post was made and needed more exposure to my question. And yes I installed the app from a downloaded RPM.

Thanks all.

Last edited by swamprat; 06-19-2017 at 07:51 PM.
 
Old 06-20-2017, 12:55 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,636

Rep: Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614Reputation: 5614
Quote:
Originally Posted by swamprat View Post
there weren’t any relevant responses where the original post was made and needed more exposure to my question.
You told in your other thread that package is already installed. So what is the goal to repeat that question in a new thread?
 
Old 06-20-2017, 12:47 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,238
Blog Entries: 4

Rep: Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263
Quote:
Originally Posted by Laserbeak View Post
Try putting this at the beginning of your code:
Code:
BEGIN {
     push (@INC, "/directory/where/JSON.pm/is");
}
Actually, the preferred method is use lib ... refer to the hyperlinked perldoc page for details.

Last edited by sundialsvcs; 06-20-2017 at 12:48 PM.
 
Old 06-20-2017, 12:49 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,238
Blog Entries: 4

Rep: Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263
Quote:
Originally Posted by Laserbeak View Post
Try putting this at the beginning of your code:
Code:
BEGIN {
     push (@INC, "/directory/where/JSON.pm/is");
}
Actually, the preferred method is use lib ... refer to the hyperlinked perldoc page for details.

However, it is likely that the actual root cause is that something is missing or not-installed, as other posters have suggested. As with other languages, many distros package various components separately. You should not have to specify the library path manually. You can expect the JSON module to be loaded into one of the default paths, if it has been installed at all.

Last edited by sundialsvcs; 06-20-2017 at 12:51 PM.
 
Old 06-24-2017, 06:34 PM   #9
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 194

Rep: Reputation: Disabled
When perl does major update, it commonly it breaks clamtk. As others mentioned, install the packages either via your package manager (preferred) or if not available thru it install the modules via
Code:
sudo perl -MCPAN -e 'install MODULE::Of::Interest'
whereas "MODULE::Of::Interest" is not a real module, replace it with the module that is missing and MCPAN will install it. Launching Clamtk from terminal will tell you what modules are missing. Install, try again and do the next module if more are missing, until it launches normal in the end.
Clamtk has these dependencies: clamav, cron (fcron , fcron , cronie , cronie), desktop-file-utils, gnome-icon-theme, gtk2-perl, perl, perl-http-message, perl-json, perl-libwww, perl-locale-gettext, perl-lwp-protocol-https, perl-text-csv, python, zenity

Last edited by WFV; 06-24-2017 at 08:46 PM.
 
Old 06-29-2017, 09:37 AM   #10
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: Centos 7 , Linux Mint 18.1 Under VMware in Win7
Posts: 542

Original Poster
Rep: Reputation: 34
Thank you everyone for staying with me on this problem.

After following the instructions for updating Perl I'm now getting the message below:

[root@localhost Downloads]# clamtk
Icon 'gtk-new' not present in theme at /usr/share/perl5/vendor_perl/ClamTk/GUI.pm line 282.
[root@localhost Downloads]#

Any help with the above will be appreciated.

Thanks
 
Old 06-29-2017, 08:39 PM   #11
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 194

Rep: Reputation: Disabled
If Oxygen updated recently you might have to edit the icon.theme file in /usr/share/icons/oxygen
Code:
# nano index.theme
edit the Inherits= line by adding "gnome" to it, no quotes and doesn't matter the order
Code:
Inherits=Adwaita,gnome,hicolor
every time Oxygen updates, I have to do it.
then run
Code:
# gtk-update-icon-cache
also clamtk should run as normal user, unnecessary to run as root

Last edited by WFV; 06-29-2017 at 08:41 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Why ide_pci_generic module missing areftaidi SUSE / openSUSE 0 02-08-2009 02:00 PM
Module missing for Joystick tsunamikitsune Linux - Hardware 2 02-28-2007 02:20 PM
Missing Nvidia module? It WAS there! tenchi Slackware 8 09-11-2004 05:41 PM
Module Missing!!!??? mapesju Slackware 4 08-13-2004 09:08 PM
Missing ndiswrapper module Norky Linux - Wireless Networking 0 05-08-2004 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:52 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