LWP, das Perl-Modul für das World Wide Web, ist tückisch und schreibt ein kleines Skript, das die Header einer als Argument übergebenen URL zurückliefert, über das ursprüngliche UNIX-Tool head
in /usr/bin
. Um das zu verhindern, sollte man head
vor der Installation auslagern und danach die Verhältnisse klarstellen:
sudo mv /usr/bin/head /tmp sudo perl -MCPAN -e 'shell' cpan> install HTML::Parser cpan> install LWP sudo mv /usr/bin/get /usr/local/bin/lwp-get sudo mv /usr/bin/head /usr/local/bin/lwp-head sudo mv /usr/bin/post /usr/local/bin/lwp-post sudo mv /tmp/head /usr/bin
Warum LWP das macht? Jeremy Mates erklärt es und nennt auch gleich einen Weg, das Problem zu vermeiden:
The default filesystem on Mac OS X (HFS+) folds case unlike traditional unix filesystems; this can cause problems for unix systems that assume
File
andfile
are two different things. For example, theLWP::UserAgent
module installs/usr/bin/HEAD
, which clobbers the existing/usr/bin/head
utility. Solutions to this include not installing theHEAD
and similar shortcuts, or ensuring these utilities are installed under/usr/local/bin
instead. One way is to update theperl Makefile.PL
arguments to install third-party utilities into a different directory than/usr/bin
.
cpan> o conf makepl_arg "INSTALLBIN=/usr/local/bin INSTALLSCRIPT=/usr/local/bin" cpan> o conf commit