Error installing Net::LDAP on Oracle Enterprise Linux - linux

I am trying to install the Net::LDAP module on an OEL box using CPAN, but I get the following error:
[root ~]# cpan -i Net::LDAP
CPAN: Storable loaded ok
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
Could not pipe[ --decompress --stdout /root/.cpan/sources/authors/01mailrc.txt.gz |]: No such file or directory at /usr/lib/perl5/5.8.8/CPAN.pm line 5726.
Can someone please guide me on how to troubleshoot this?

CPAN needs to be configured before you can use it to install stuff.
There should be a whole bunch of stuff under
/root/.cpan
Generally cpan gets this stuff automatically, but for some reason it's
not there on your machine. In particular it needs this file.
/root/.cpan/sources/authors/01mailrc.txt.gz
If that file is there, then cpan man be missing the gzip binary needed to uncompress that file.

Related

Cant install Net::SSH2 perl module

I'm trying to install a perl module: Net::SSH2 with cpan but doesn't actually works.
cpan -f install Net::SSH2
Output:
CPAN: Storable loaded ok (v2.20) Going to read
'/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Mon, 22 May 2017 22:29:03 GMT HTTP::Date
not available ............. New CPAN.pm version (v2.16) available.
[Currently running version is v1.9402] You might want to try
install CPAN
reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session.
...............................................................DONE
Going to read '/root/.cpan/sources/modules/03modlist.data.gz' Can't
locate object method "data" via package "CPAN::Modulelist" (perhaps
you forgot to load "CPAN::Modulelist"?) at (eval 16) line 1. at
/usr/share/perl5/CPAN/Index.pm line 518
CPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/modules/03modlist.data.gz') called at
/usr/share/perl5/CPAN/Index.pm line 85
CPAN::Index::reload('CPAN::Index') called at /usr/share/perl5/CPAN.pm line 955
CPAN::exists('CPAN=HASH(0x21fd2f0)', 'CPAN::Module', 'install') called at /usr/share/perl5/CPAN/Shell.pm line 1243
CPAN::Shell::expandany('CPAN::Shell', 'install') called at /usr/share/perl5/CPAN/Shell.pm line 1639
CPAN::Shell::rematein('CPAN::Shell', 'force', 'install', 'install') called at /usr/share/perl5/CPAN/Shell.pm line 1935
CPAN::Shell::ANON('CPAN::Shell', 'install', 'install') called at /usr/bin/cpan line 318
main::_default('ARRAY(0x1938f18)') called at /usr/bin/cpan line 278
It seems that your installation of CPAN is incomplete or otherwise corrupted. OS and Perl version could be helpful. On many current Linux distributions, Perl modules and their dependencies can be installed using the normal system software utilities like yum (RHEL/CentOS), apt (Debian/Ubuntu) and yast (SuSE). Drawback is that versions may not be the most current.
This PerlMonks thread has someone else with a similar problem. It looks like this answer worked in that case:
It looks to me like you have some corrupt data in your .cpan directory. I'd blow it away and try again:
$ rm -rf /home/user/.cpan
Try it at your own risk. In your case, you would need to delete /root/.cpan.
In addition, the correct use of cpan is to list the module names after the command. So, instead of cpan install Net::SSH2, you should use cpan Net::SSH2. If you use the -f option, you must specify -i: cpan -f -i Net::SSH2, but try without forcing things first. You do not want to willy-nilly install broken modules in the system's perl.
In fact, in general, you do not want to mess with the system's perl at all. Build your own perl and mess with it as much as you want.
PS: install is a dummy module created precisely because many people make this mistake.
The safest and most convenient way to install Perl modules can depend on distribution. For example, the recommended method on Fedora is:
$ sudo dnf install 'perl(Net::SSH2)'
As shown in that example, installing Perl modules on your system usually requires sudo or the root user. So you might want to try your command with sudo if you're a sudoer.
If you don't have that kind of power, you may need to install it locally. That usually means downloading it to a Perl library directory you create in your home directory, and including the path in #INC somehow, such as updating your $PERL5LIB to include the /home/user/perl/modules/Net-SSH2/lib/ or whatever your path to the module lib directory is.

How can we generate MCE(machine check errors)

As much I know that mcelog is used to check the memory errors in the hardware. I want to simulate the same case. I don't have any machine which is having the issue with hardware where I can simulate this case. Can anybody suggest me some simulator or any other way through which I can generate these errors. Because my main aim is to display the Uncorrectable Memory errors. Thanks.
You can use the tool mce-inject, but you'll need to load the mce_inject kernel module. This kernel module is available on Ubuntu 12.04 (the only system I have access to) and should be available on newer Ubuntus, as well.
First, you need to load the module:
$ sudo modprobe mce_inject
Next, you need to download the source for the mce_inject tool, install the dependencies, and compile it:
$ git clone https://github.com/andikleen/mce-inject.git
$ sudo apt-get install flex bison
$ cd mce-inject
$ make
Next, you need to create a file that simulates the error you want. You should check the mce-inject man page (included in the source) for more information on the structure. You can find some examples in the test/ directory in the [mce-inject source](
Injecting a FATAL error can destabilize and crash the system; doing this is not recommended.
Once you've decided which example file to use (or have created your own) you can inject it with mce-inject. For example, injecting the test/corrected example error included with mce-inject:
$ sudo ./mce-inject test/corrected
You can now check your logs and find that the error has been injected.

Net-SNMP perl module won't make

Firstly, I am using a Beaglebone Black with the Angstrom distribution.
My mib2c program for net-snmp won't work and give the following error:
ERROR: You don't have the SNMP perl module installed. Please obtain
this by getting the latest source release of the net-snmp toolkit from
http://www.net-snmp.org/download/ . Once you download the source and
unpack it, the perl module is contained in the perl/SNMP directory.
See the README file there for instructions.
So I go to /net-snmp/perl/SNMP and run
perl Makefile.PL
make
Now it gives me this error:
make: *** No rule to make target `/usr/lib/perl/5.14.2/ExtUtils/typemap', needed by `SNMP.c'. Stop.
Ok, so I know that the ExtUtils module must be installed (which it is), but all that I have in that folder are .pm files. When I run them using perl nothing happens. I've also tried to look for the files online (after I create a typemap file there it asks for a xsubpp file aswell), but to no avail.
How do I install those modules so that the correct files will be there?
On Ubuntu 14.04, I needed to sudo apt-get install libsnmp-perl
Install Perl Net::SNMP
perl -MCPAN -e 'install Net::SNMP'
You could try to install it using CPAN:
perl -MCPAN -e 'install HTML::Template'

Create .deb package - can't get dependencies

I am trying to create a simple .deb package by following a wonderful tutorial,
and my problem is that when I try to get the dependencies of the package by executing this command:
dpkg-depcheck -d ./configure
I get this error:
strace: ./configure: command not found
Running strace failed (command line:
strace -e trace=open,execve -f -q -o /tmp/depchqCdeiv ./configure
which I don't understand. Do you have any idea about what could be causing this?
This on Ubuntu 12.04.
I think that tutorial is not the better approach to create quality deb packages.
Better resources would be:
Debian New Maintainers' Guide
Introducing the Debian packaging tutorial
About the error, I imagine that the software that you are trying to package doesn't use autotools, and for that reason it doesn't have any configure script. The way that the dependencies are checked depends on the build system used. If you don't have a configure script, maybe your project root directory has a SConstructp, a setup.py or simply a Makefile.
Giving more information about the software you are trying to package I can provide further help.
Best regards

You have Archive::Tar 1.3901, but 1.50 or later is recommended. Please upgrade. issues

Hi i am trying to install bugzilla on my mediatemple server, i am totally a novice when i comes to cmmd line so have found a tutorial on-line which was going well till i tried to upgrade the above.
the below is the message i get in the command line and after looking on-line for about an hour i cant seem to find a resolution to the issue. basically i am stuck on where to go now to upgrade what its asking
Installing Archive::Tar version 1.76...
Running install for module 'Archive::Tar'
Running make for B/BI/BINGOS/Archive-Tar-1.76.tar.gz
CPAN: Digest::SHA loaded ok (v5.62)
CPAN: Compress::Zlib loaded ok (v1.42)
Checksum for /root/.cpan/source/authors/id/B/BI/BINGOS/Archive-Tar-1.76.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.3901)
You have Archive::Tar 1.3901, but 1.50 or later is recommended. Please upgrade.
Uncompressed /root/.cpan/source/authors/id/B/BI/BINGOS/Archive-Tar-1.76.tar.gz successfully
Using Tar:/bin/tar xvf "Archive-Tar-1.76.tar":
Couldn't untar Archive-Tar-1.76.tar
CPAN: File::Temp loaded ok (v0.22)
CPAN: CPAN::Meta loaded ok (v2.110930001)
CPAN: Time::HiRes loaded ok (v1.9717)
Package seems to come without Makefile.PL.
(The test -f "/root/.cpan/build/BINGOS-J_TqCf/Makefile.PL" returned false.)
Writing one on our own (setting NAME to ArchiveTar)
Had problems unarchiving. Please build manually
Skipping test because of notest pragma
Running make install
Make had some problems, won't install
Manually install a new Archive::Tar version first. It looks like it's trying to use /bin/tar to untar the Archive::Tar package it downloaded, but failing to do so, perhaps because that's not the correct location of your tar binary.
Use which tar to find out where tar is on your system - it may be /usr/bin/tar, in which case, it's looking in the wrong place.
If you're using CPAN.pm for this, you can correct the path to tar with the following from the CPAN.pm shell (which you can get to with cpan or perl -MCPAN -e shell:
o conf tar '/usr/bin/tar'
o conf commit
(Using whatever path which tar gave you.)

Resources