perl 모듈이 없을때...
글쓴이: puaxx / 작성시간: 목, 2006/07/06 - 1:10오후
현재 카페24에서 호스팅을 받고 있습니다.
twiki라는게 좋아 보여서 twiki를 설치할라고 보니... 몇가지 perl모듈을 요구하네요..근데 현재 호스팅받고 있는 시스템에는 모듈이 안깔려 있습니다..
perl을 로컬에 하나 설치할까 하다가 용량 많이 잡아먹고...(실은 설치스크립트가 복잡해서 -- 자꾸오류나고..)
그래서 모듈만 로컬에 설치하고 그 모듈을 찾을때 로컬에 설치한 모듈을 사용하도록 할수 있을까요?
아직 내공이 부족해서 잘 모르겠네요 ^^;
Forums:
Installing perl module in non-standard places
설치하고자 하는 module을 CPAN에서 받은후
다음과 같은 절차를 거치면 됩니다.
twiki 설정에도 보면 추가된 module path를 인식하도록 하는 설정이 있을겁니다.
출처:http://world.std.com/~swmcd/steven/perl/module_mechanics.html#TOC24.5
Installing in non-standard places
On many systems, /usr/local/lib/perl5/site_perl is owned by root with 0755 permissions. This means that you must su to root in order to install a module there. If you lack root on your system, you can
* ask your system administrator to install the module for you
* install the module somewhere else
Somewhere else
Here's how to install a Perl module in a non-standard place.
First, select a directory in which to install the module. It doesn't strictly matter where the directory is located, but it must be somewhere that
* you have write access
* won't go away
Your home directory is probably a good choice; /usr/tmp is probably not. We'll write
/home/uid/
for your home directory. It doesn't matter what you call the directory. I would suggest
/home/uid/lib/perl
Then go back to the development directory and type
.../development/Foo-Bar>perl Makefile.PL LIB=/home/uid/lib/perl
.../development/Foo-Bar>make install
This will build the module and install it in your private directory.
PERLLIB
Perl doesn't know to look for modules in your private directory; you have to tell it. There are several ways to do this. Perhaps the most appropriate in this context is to set the PERLLIB environment variable. In Bourne shells, run
EXPORT PERLLIB=/home/uid/lib/perl
and Perl will add your directory to the front of @INC.
감사합니다.
감사합니다.많은 도움이 됐습니다.
댓글 달기