Jul 03

Installing WxWidgets on 64 bit Ubuntu

Category: Linux,Perl   — Published by tengo on July 3, 2008 at 5:25 am

Getting a working version of Wx and wxperl running on a amd64 Ubuntu system (mine was 6.06 dapper) can be a bit tricky. Everytime I tried to install Wx via cpan the Alien::wxwidgets module complained and refused to install this required package for Wx.

The problem seemed be that I had no version of Wx on my system and the compile routine from Alien::wxwidgets failed as well, don't know why. So I decided to first get a working version of Wx onto my system via apt. Follow this guide to get a version 2.8 on your system.

Running cpan again, answer the question to compile WxWidgets with "No" as it is already on your system. But soon you will find out that cpan has even more to complain: it can't find wx-config. This is because we did not install the -dev packages. Do so by:

apt-get install libwxbase2.8-dev libwxgtk2.8-dev

Now the WxWidgets toolset is complete and you can install Wx from cpan. If it complains that it still has no luck, try one of the older version. In my case I had luck with Wx 0.83:

cpan> install MBARBON/Wx-0.83.tar.gz

That's it.