简体   繁体   中英

Changing installation directory of CPAN perl module using MinGW

I installed MinGW for installing perl modules from CPAN. after successful installation in C:/MinGW, I started msys.bat typed

cpan

cpan> install File::List

The module installed successfully. But it is not found in lib or site directory of c:/perl. It is installed in C:\\MinGW\\msys\\1.0\\lib\\perl5\\site_perl\\5.8\\File instead.

How could I change the installation directory of CPAN modules to c:/perl/site or c:/perl/lib? I used all default setting of MinGW. OS is Windows 7. Perl version 5.12.2.

"How could I change the installation directory of CPAN modules to c:/perl/site or c:/perl/lib?"

It's not clear to me why you would want to do that. If you used MinGW to install modules from CPAN, it is presumably because you want the advantages of the MinGW toolset (as described at http://mingw.org/ ). And MinGW presumably knows what it is doing when it installs in the directory you cited.

If you really want to install to c:/perl/site or c:/perl/lib , you should probably use the cpan client that comes with Perl itself.

I figured out the problem. I don't have Microsoft Visual C++ redistributable 2008, 2010. I installed it and my problem is solved. May be Perl module builds which requires C compiler required this components.

Anyone ever have similar experience?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM