Sponsored Content
Top Forums Shell Programming and Scripting Perl : Loading moduled in local directory. Post 302883340 by popeye on Monday 13th of January 2014 11:15:08 AM
Old 01-13-2014
Perl : Loading moduled in local directory.

I have the need to load modules in a local directory. I am a perl new guy. When I test Net::SSH2, I get the following message. I did load the required libssh2.

Quote:
cpan[2]> test Net::SSH2
Running test for module 'Net::SSH2'
Running make for R/RK/RKITOVER/Net-SSH2-0.53.tar.gz

CPAN.pm: Building R/RK/RKITOVER/Net-SSH2-0.53.tar.gz

Use of uninitialized value in scalar assignment at /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1868.
Use of uninitialized value in scalar assignment at /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1869.
Use of uninitialized value in scalar assignment at /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1879.
Use of uninitialized value in scalar assignment at /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1880.
Subroutine checklibs redefined at inc/Module/Install/CheckLib.pm line 11.
Subroutine assertlibs redefined at inc/Module/Install/CheckLib.pm line 25.
Subroutine _author_side redefined at inc/Module/Install/CheckLib.pm line 39.

The libssh2 library is required by this module. If you don't have it, you can
download it from http://www.libssh2.org; you may also need OpenSSL, which can
be obtained from OpenSSL: The Open Source toolkit for SSL/TLS , or libgcrypt, which can be obtained
from The GNU Privacy Guard .

Debian: sudo aptitude install libssh2-1-dev
OpenSUSE: sudo zypper in libssh2-1 libssh2-devel

You can pass your libssh2 lib and include dirs (and extra link args) on the
command line. E.g.:

perl Makefile.PL lib=$HOME/libssh2/lib inc=$HOME/libssh2/include \
ldargs="-lz"

These can also be set through the LIBSSH2_LIB/LIBSSH2_INCLUDE/LIBSSH2_LDARGS
environment variables.

To build with libgcrypt instead of OpenSSL, pass 'gcrypt' as a parameter to
Makefile.PL, e.g.:

perl Makefile.PL gcrypt

If you want to build on Windows, see the file BUILDING.WIN32 in the
distribution.

Can't link/include C library 'libssh2.h', 'ssh2', aborting.
No 'Makefile' createdCPAN: YAML loaded ok (v0.84)
RKITOVER/Net-SSH2-0.53.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Failed during this command:
RKITOVER/Net-SSH2-0.53.tar.gz : writemakefile NO -- No 'Makefile' created

Not sure where to go from here. Is there a way to test that libssh2 is loaded correctly ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Function loading in a shell scripting like class loading in java

Like class loader in java, can we make a function loader in shell script, for this can someone throw some light on how internally bash runs a shell script , what happenes in runtime ... thanks in advance.. (1 Reply)
Discussion started by: mpsc_sela
1 Replies

2. Shell Programming and Scripting

Help loading a program into perl from a file on desktop

So I want to use this program that I have downloaded from: PaGE - Patters from Gene Expression However, I am not sure how to actually get in to and run the program... I can log into the server, and was assuming I needed to get the "PaGE_5.1.6.pl" file into a folder some how, but not sure how to... (2 Replies)
Discussion started by: silkiechicken
2 Replies

3. Shell Programming and Scripting

Perl - Error loading module.

Hi, I have a strange issue in my script. When script is run from command prompt it runs fine,but when run from cron it exist with error message. I narrowed down the issue and found that " use Mail::Sender;" is the culprit. If I comment the statment the code runs fine in both command and... (9 Replies)
Discussion started by: coolbhai
9 Replies

4. Solaris

sharing a directory between local and global zone

is this the step? add fs set dir=/export set special=/export set type=lofs add options rw end i notice i can't post immediately, moderator needs to moderate. i have 1 more post still haven't appear in the forum..hmm.... (1 Reply)
Discussion started by: binary0011
1 Replies

5. Shell Programming and Scripting

Environment Variable for Local Directory?

This seems like a simple thing, but I can't seem to find an environment variable that has the local/current directory stored in it. I have a script that writes out the files in a directory. I want to append the full path to the file names in the output file. (4 Replies)
Discussion started by: ttilsch
4 Replies

6. Shell Programming and Scripting

Loading variables - Perl

I'm trying to load a set of variables as defined by a local configuration file. Not too sure what I'm missing so I'll just post it as a whole. blub.pl #!/usr/bin/perl use strict; use warnings; my $config_file="blub.config"; Config_Loader(); sub Config_Loader {... (8 Replies)
Discussion started by: adelsin
8 Replies

7. UNIX for Dummies Questions & Answers

Scp from local to external directory

Hi, I am trying to copy a whole directory from my home /RUN1 to the external directory jorgensen@hal.oerc.ox.ac.uk:/home/compchem/jorgensen/simulations The command I have used is: scp -r jorgensen@hal.oerc.ox.ac.uk:/home/compchem/jorgensen/simulations The error message I get is: ... (5 Replies)
Discussion started by: chrisjorg
5 Replies

8. Shell Programming and Scripting

FTP files from different directory from remote server to one directory in local

Hi All, I want to search for .log files from folders and sub folders in remote server and FTP them to one particular folder in the local machine. I dont want to copy the entire directory tree structure, just have to take all the .log files from all the folders by doing a recursive search from the... (3 Replies)
Discussion started by: dassv
3 Replies

9. UNIX for Dummies Questions & Answers

File listing from remote to local directory

Hello, I have a file at remote server. I have to select only current day's files that are dropped on ftp server. The files do not have date or timestamp on them. so I plan to get the file listing from remote server to the local server. Based on file listing date I can find out when the files... (2 Replies)
Discussion started by: pavan_test
2 Replies

10. Shell Programming and Scripting

Replicate remote directory to local directory with ftp

I have system that generate files every 1 hours , i only have ftp connection from my local server to remote . $ ls -al -rw-r--r-- 1 water None 0 Feb 7 18:09 a.0800 -rw-r--r-- 1 water None 0 Feb 7 18:09 a.0900 -rw-r--r-- 1 water None 0 Feb 7 18:09 a.1000 is there any perl / php... (3 Replies)
Discussion started by: before4
3 Replies
libssh2_version(3)						  libssh2 manual						libssh2_version(3)

NAME
libssh2_version - return the libssh2 version number SYNOPSIS
#include <libssh2.h> const char * libssh2_version(int required_version); DESCRIPTION
If required_version is lower than or equal to the version number of the libssh2 in use, the version number of libssh2 is returned as a pointer to a zero terminated string. The required_version should be the version number as constructed by the LIBSSH2_VERSION_NUM define in the libssh2.h public header file, which is a 24 bit number in the 0xMMmmpp format. MM for major, mm for minor and pp for patch number. RETURN VALUE
The version number of libssh2 is returned as a pointer to a zero terminated string or NULL if the required_version isn't fulfilled. EXAMPLE
To make sure you run with the correct libssh2 version: if (!libssh2_version(LIBSSH2_VERSION_NUM)) { fprintf (stderr, "Runtime libssh2 version too old!"); exit(1); } Unconditionally get the version number: printf("libssh2 version: %s", libssh2_version(0) ); AVAILABILITY
This function was added in libssh2 1.1, in previous versions there way no way to extract this info in run-time. libssh2 1.1 23 Feb 2009 libssh2_version(3)
All times are GMT -4. The time now is 12:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy