Correct me if i'm wrong, but XS and Dynaloader based modules are those who use C/C++ shared objects (.so) and which are not PP (Pure Perl)?
Now assuming I have a machine, which does not have web-connectivity whatsoever (Solaris 10) and I want, for instance, to install Crypt::OpenSSL::AES
(XS based module), copying the AES.pm
file to the relevant path in @INC wont do any good since my system does not have libssl
installed.
My second and most important question is, how do I install such modules when I don't have CPAN? my approach is:
libssl
for my platform, compile it, but where should I put that shard object file so that perl can find it?AES.pm
to the relevant path in @INC, or do I need to configure / make it?To install Perl modules using CPAN, you need to use the cpan command-line utility. You can either run cpan with arguments from the command-line interface, for example, to install a module (e.g Geo::IP) use the -i flag as shown.
Rules for Installing Modules 1 Install Modules in PSModulePath. Whenever possible, install all modules in a path that is listed in the PSModulePath environment variable or add the module path to the PSModulePath environment variable ... 2 Use the Correct Module Directory Name. ... 3 Effect of Incorrect Installation. ...
The third way to install PowerShell modules is to import existing ones into active memory so that you can access the same in the current session. Use the following command to import the modules. Most times, this is not an independent way of installing a PowerShell module.
Installing Modules for all Users in Program Files If you want a module to be available to all user accounts on the computer, install the module in the Program Files location. $Env:ProgramFiles\WindowsPowerShell\Modules\<Module Folder>\<Module Files>
Installing Multiple Versions of a Module 1 Create a directory for each version of the module. Include the version number in the directory name. 2 Create a module manifest for each version of the module. ... 3 Add the module root folder path to the value of the PSModulePath environment variable, as shown in the following examples.
CPAN itself is part of the base perl install. It will always be available.
If you can't use the cpan
shell to talk to the internet and fetch modules, you can at least grab the tarball from the CPAN website, put it on the target machine, untar it, then run
$ cpan .
from inside the unpacked directory. This will run the CPAN installer for that distribution. Of course if it finds missing dependencies, you'll have to fetch those yourself recursively using the same technique.
If you don't have root access I would install in ${HOME}/lib
. Just make sure that the linker can find it, either the directory should be in you LD_LIBRARY_PATH
environment variable, or better point EU::MM to the library and include files.
No, the module also have a part in C which has to be compiled.
To install
Download the distribution tarball: http://search.cpan.org/CPAN/authors/id/T/TT/TTAR/Crypt-OpenSSL-AES-0.02.tar.gz
Then follow the steps in the README file under INSTALLATION
perl Makefile.PL INC="-I $HOME/include" LIBS="-L $HOME/lib"
make
make test
make install
This will make sure that the module is correctly build, tested and installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With