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.