[tex-live] biber in TeX Live

François Charette firmicus at ankabut.net
Thu Apr 22 16:48:15 CEST 2010


On 22/04/2010 13:48, Joachim Schrod wrote:
> Victor Ivrii wrote:
>    
>> On Thu, Apr 22, 2010 at 5:55 AM, Joachim Schrod<jschrod at acm.org>  wrote:
>>
>>      
>>> Did you use the cpan command for installation, or did you download
>>> the modules by hand? The latter is a nightmare, the former should
>>> work. Downloading CPAN modules is like installing rpm/deb packages
>>> by hand without using apt/yum/zypper -- a nighmare of dependencies.
>>>        
>> Usual mantra: download - perl Makefile.PL - make -make check - sudo make install
>>
>> What is "cpan command"?
>>      
> cpan is to the "usual mantra" what tlmgr is to installing macros
> from CTAN manually. Or what apt/yum/zypper are to
> download/configure/make/make install. Relief from a big hassle.
>
> It is a command that searches CPAN, shows information about CPAN
> modules, and installs CPAN modules while taking all its
> dependencies in account. (Of course, the dependency must be
> declared in the CPAN module description; but almost all modules
> that I have encountered are OK in that.) It may also used for
> housekeeping of an entire local Perl installation, but that goes
> beyond our use case.
>
> That command is also the reason for the existence of CPAN modules
> Bundle::*. These are empty packages with just dependencies to other
> modules that install a whole set of modules that are
> prefered/recommended for a given task. E.g., installing
> Bundle::Apache2 would install the whole mod_perl framework for
> Apache2, including all recommended modules.
>
> The cpan command may be problematic to use if your Perl
> installation is provided by a package manager, as it is on most
> Linux distributions. Then it may overwrite files in the
> distribution's perl package without updating the package manager
> information, which is usually a Bad Thing(tm). But then, some
> people just don't care and wait what happens. (They may get burned
> by the next system update that throws away their changes.)
>    

On my Linux system cpan and cpanp are configured to install to 
"sitelib", which is the Perl equivalent of TEXMFLOCAL. That means there 
is no overlap or conflict, as perl packages installed via the package 
manager go to "vendorlib" (which has a lower priority). Note also that 
cpanp (CPANPLUS, another tool to manage CPAN distributions) has the 
advantage over cpan that one can actually uninstall modules. Generally I 
still prefer to use a CPANPLUS plugin to generate packages for my Linux 
distro instead of installing directly, that way I keep everything under 
the control of my package manager. But most systems won't allow this and 
I would not recommend this approach to a normal user anyway.

> Therefore I normally use a special configuration for this command
> that installs these modules in a separate directory tree; just like
> a TL user would have a local texmf tree. One can use such a
> directory tree via env var PERL5LIB, and one can distribute it to
> other parties. (Don't forget to distribute the sources as well,
> then; cpan command leaves them in a download cache directory.)
>
>    

Another possibility is to use local::lib 
(http://search.cpan.org/dist/local-lib/lib/local/lib.pm) to install 
everything to, say, $HOME/perl5 instead. A very interesting, recent 
alternative to cpan and cpanp is cpanm 
(http://search.cpan.org/dist/App-cpanminus/lib/App/cpanminus.pm). It has 
no dependencies, is standalone, and requires zero-configuration. Since 
it gets its metadata from http://cpanmetadb.appspot.com it does not need 
to download and parse the large CPAN databases all the time, which saves 
as lot of time and RAM. You can download the standalone script 
<http://xrl.us/cpanm> thus:
     wget http://xrl.us/cpanm
then make it executable, and run, for instance:
     cpanm biblatex-biber-v0.5.3.tar.gz
which should automagically install Biber and all its dependencies. The 
installation target will be "sitelib" if you use sudo or if you have the 
appropriate permissions, otherwise it will use local::lib to install 
under ~/perl5.
Definitely worth a try!

François


More information about the tex-live mailing list