linux cpan 参数配置,【Linux】Ubuntu安装cpan模块

本文介绍了在Ubuntu系统中安装PerlIO::Gzip模块的方法,包括通过yum在Centos上找到预包装的RPM,然后在Ubuntu上安装dh-make-perl和zlib1g-dev辅助工具,最后使用dh-make-perl构建并安装模块的DEB包。该过程解决了Ubuntu上没有直接可用的PerlIO::Gzip包的问题。
摘要由CSDN通过智能技术生成

While writing some perl test scripts that I wanted to be able to

handle both archived and current logs I came

across PerlIO::Gzip for

which there were pre-packaged rpms available through yum on the

Centos machine I was using at the time. After bringing the scripts

back to my (Ubuntu) desktop though I realised very soon that there

was no package immediately available through the usual channels

(main through to multiverse).

Being a cpan module there is a very simple way to bring it into

the debian packaging system and a step-by-step guide

on debian-administration which

helped illustrate this.

The simple steps are:

# Install the helper app

$ sudo aptitude install dh-make-perl

# Install the zlib development files

$ sudo aptitude install zlib1g-dev

# Download the module source and build a debian package

# This should create a .deb in the current directory

# In my case it is for the amd64 arch

$ sudo

dh-make-perl --build --cpan "PerlIO::gzip"

# Install the resultant package

$ sudo dpkg -i /libperlio-gzip-perl_0.18-1_amd64.deb

上面的“/libperlio-gzip-perl_0.18-1_amd64.deb”视生成的deb名字而定,不同位系统不一样。

The installation of the zlib development files is not

immediately obvious as there are no explicit dependencies for it

but attempting to build without them results in a slew of errors

including this one:

gzip.xs:16:18: error: zlib.h: No such file or

directory

These step worked for me, hopefully they'll also be of use to

someone else.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值