Solved

Can't locate Dahdi.pm after installing dhadi

Posted on 2014-02-11
8
751 Views
Last Modified: 2014-02-22
Dear Experts:

I am in process of setting up asterisk ip-pbx on centos 6.5 managed to install the below listed packages successfully
rpm -ivh popt-1.13-7.el6.i686.rpm
rpm -ivh slang-2.2.1-1.el6.i686.rpm
rpm -ivh newt-0.52.11-3.el6.i686.rpm
rpm -ivh libstdc++-4.4.7-4.el6.i686.rpm
rpm -ivh libusb-0.1.12-23.el6.i686.rpm
rpm -Uvh dahdi-2.8.0.1-1.i686.rpm dahdi-devel-2.8.0.1-1.i686.rpm kmod-dahdi-2.8.0.1-1.i686.rpm

after the above installed when executed  lsdahdi, below message
# lsdahdi
can't locate Dahdi.pm in @INC (@INC contains: /usr/sbin /usr/sbin/perl_modules /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/sbin/lsdahdi line 14.
BEGIN failed--compilation aborted at /usr/sbin/lsdahdi line 14.

--------------------
executed the find command
 find -name Dahdi.pm
./lib/perl5/vendor_perl/5.8.8/Dahdi.pm

Please suggest to fix this

Thanks in advance
0
Comment
Question by:D_wathi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 28

Expert Comment

by:FishMonger
ID: 39850826
The easiest solution might be use a lib or local::lib pragma statement in each script pointing to where the module is installed.
lib preagma
local::lib pragma

The other option would be to use cpan or cpanm to reinstall the module so that it gets put within your @INC path.
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39851401
Maybe you could try adding /lib/perl5/vendor_perl/5.8.8 to your PERL5LIB environment
0
 
LVL 34

Assisted Solution

by:Duncan Roe
Duncan Roe earned 167 total points
ID: 39851487
@INC contains /usr/lib64/perl5/vendor_perl but you have found Dahdi.pm under ./lib/perl5/vendor_perl/5.8.8/. Since pm files are Perl source, you could try copying Dahdi.pm to one of the directories mentioned in @INC. Any non-text files in ./lib/perl5/vendor_perl/5.8.8/ will be 32-bit, probably unsuitable for you so I would caution against mentioning that directory in the path.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:D_wathi
ID: 39853697
Thanks for the reply, can you please help in steps on what to be done , copy of Dahdi.pm to be placed in which directory path  not getting  what is @INC
0
 
LVL 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 167 total points
ID: 39853826
From folder where you did the find command:

cp ./lib/perl5/vendor_perl/5.8.8/Dahdi.pm /usr/local/lib64/perl5/
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 39854478
@D_wathi re: @INC you posted @INC contains: /usr/sbin /usr/sbin/perl_modules /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl in your original Q. So any of these directories would be fine as a target into which to copy
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39854533
@Duncan Roe - Asker may not realize that @INC is output from the lsdahdi command.

@D_wathi - Did you run the cp command I suggested?
0
 
LVL 28

Accepted Solution

by:
FishMonger earned 166 total points
ID: 39854668
Keep in mind that if you decide to copy the Dahdi.pm module to another location, you'll also need to copy the Dahdi directory which has the rest of the supporting modules that Dahdi.pm needs.

When you need to upgrade down the road and use rpm, you'll need to remember to recopy those files otherwise you may not have the updated versions of the perl modules.

This path issue is one of the reasons I always built  asterisk and dahdi from source rather than using yum or rpm.

Based on your @INC paths, it appears that you may have multiple versions of perl installed or someone previously modified the PERL5LIB environment var to accommodate a similar install issue.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question