I'm trying to build a perl program from source. The program has a Build script which installs all the many dependencies by cpan by invoking perl ./Build installdeps. However, some of the dependencies can't be installed by cpan properly, namely Wx.
On a fresh install of Ubuntu 22.04, I've been able to workaround this by installing the necessary modules via apt. For Wx, for example, I can do sudo apt install libalien-wxwidgets-perl libwx-perl and then if I run perl ./Build installdeps or simply cpan -i Wx, cpan detects that Wx is already installed, and I can eventually run ./Build install and the program will work with the dependencies installed by apt. But, on my main computer, I'm unable to do this. I can install all the same dependencies by apt, but cpan still thinks they're not installed
sudo apt install libalien-wxwidgets-perlwill install the module for the systemperl. This is not what you intend to do. From the comments you posted and the behaviour you describe, I gather you want to install the module for a differentperl. This is usually done usingNote that you need to use the
cpanthat was installed by the relevantperl. That's how it knows for whichperlto install the module, so to speak. Use the full path if necessary. That said, it sounds like you are using the correctcpan, so this paragraph isn't applicable to you.Now, you say
cpan Alien::wxWidgetsdoesn't work for you. That may be, but that's a problem you'll need to address directly, not by installing the module using a differentperl. Oneperlcan't use a module built by a differentperl.[1]perlon the same system.