On Mon, Aug 9, 2010 at 6:56 AM, Daniel Carrera <dcarr...@gmail.com> wrote: > > On Mon, Aug 9, 2010 at 12:02 PM, Eric J. Roode wrote: > > >>> $ perl -MWx -e0 >>> Can't locate Wx.pm in @INC (@INC contains: >>> /usr/local/lib/perl5/site_perl/5.12.1/i686-linux >>> /usr/local/lib/perl5/site_perl/5.12.1 >>> /usr/local/lib/perl5/5.12.1/i686-linux /usr/local/lib/perl5/5.12.1 .). >>> BEGIN failed--compilation aborted. > > I am running Ubuntu 10.04, same as you. On my system: > > $ locate Wx.pm > /usr/lib/perl5/Wx.pm > > If you look at your @INC path, it does not contain /usr/lib. Every > path in your @INC is /usr/loca/lib/*. Probably because you are used to > compiling everything. Ubuntu / Debian always put their own files in > /usr and /usrl/local is reserved for stuff you compiled yourself.
That's actually a good reason *not* to use the package manager. Lots of system packages depend on perl, so most modern *nix distros come with a basic perl set up with predictable settings. But if you're doing development, you don't want to be mucking around with the system perl, because you could break something in the OS by installing a flaky package, or upgrading to a new version of a package with a changed API. So it is always good practice to leave the system perl alone, and build a local perl for everyone's everyday use. So in this case, everything being in /usr/local is a conscious admin decision, not just because I'm an old stick-in-the mud :-) In fact, the system perl in /usr/bin is 5.10, while the one I compiled is 5.12, so I don't think I'd really even want to include the /usr/lib path in my local perl's INC. In any case, and going back to the original problem, why wouldn't sudo cpan Wx work? -- Eric J. Roode