跑perl程式如果有缺套件的安裝方式
到 http://search.cpan.org/ 搜尋缺的套件名稱
點進去後可以看到右上方有一個download的選項
下載壓縮檔到主機上


example
# wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Unicode-String-2.09.tar.gz
--2014-04-02 18:20:33--  http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Unicode-String-2.09.tar.gz
Resolving search.cpan.org (search.cpan.org)... 199.15.176.161
Connecting to search.cpan.org (search.cpan.org)|199.15.176.161|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.cpan.org/authors/id/G/GA/GAAS/Unicode-String-2.09.tar.gz [following]
--2014-04-02 18:20:34--  http://www.cpan.org/authors/id/G/GA/GAAS/Unicode-String-2.09.tar.gz
Resolving www.cpan.org (www.cpan.org)... 199.15.176.140, 2a01:608:2:4::2, 2620:101:d000:8::140:1
Connecting to www.cpan.org (www.cpan.org)|199.15.176.140|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 122705 (120K) [application/x-gzip]
Saving to: `Unicode-String-2.09.tar.gz'

100%[==============================================================================================================================>] 122,705      116K/s   in 1.0s

2014-04-02 18:20:35 (116 KB/s) - `Unicode-String-2.09.tar.gz' saved [122705/122705]

# tar -zxvf Unicode-String-2.09.tar.gz

cd Unicode-String-2.09

# perl Makefile.PL

Writing Makefile for Unicode::String

# make

Skip blib/lib/Unicode/String.pm (unchanged)
Skip blib/lib/Unicode/CharName.pm (unchanged)
cc -c    -DAPPLLIB_EXP="/usr/local/lib/perl5/5.10.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -O2 -pipe -fno-strict-aliasing    -DVERSION=\"2.09\"  -DXS_VERSION=\"2.09\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.10.1/mach/CORE"   String.c
Running Mkbootstrap for Unicode::String ()
chmod 644 String.bs
rm -f blib/arch/auto/Unicode/String/String.so
cc  -shared  -L/usr/local/lib -fstack-protector String.o  -o blib/arch/auto/Unicode/String/String.so
chmod 755 blib/arch/auto/Unicode/String/String.so
cp String.bs blib/arch/auto/Unicode/String/String.bs
chmod 644 blib/arch/auto/Unicode/String/String.bs
Manifying blib/man3/Unicode::String.3
Manifying blib/man3/Unicode::CharName.3

# make install

Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
FreeBSD: Registering installation in the package database
Cannot create directory /var/db/pkg/bsdpan-Unicode-String-2.09: File exists
Appending installation info to /usr/local/lib/perl5/5.10.1/mach/perllocal.pod



helloworld 發表在 痞客邦 PIXNET 留言(0) 人氣()