Install Perl Tk Module Ubuntu Software

  1. Install Perl Linux
  2. Install Perl On Ubuntu
  3. Perl Tk Module

As I've already mentioned I'm creating a. I've made a start on this, and the initial development (with very limited functionality) was well received at the last rehearsal. It has much more functionality than the old that I created for the last show, and the improved version that we've been using in the rehearsals so far. This program is written using the Perl/Tk toolkit, which is provides a means of creating GUI applications using perl. As I'm already well into perl programming this is a logical step for my first real GUI based program. Now that I've been working with Perl/Tk I've been trying it out on a few different machines. It works under Windows (as long as you install the ActivePerl software first), and here are a couple of issues on two different Linux distributions, Fedora and Ubuntu.

What's the easiest way to install a missing Perl module? If you're on Ubuntu and you want to install the pre-packaged perl. Perl - Installing Tk module for. Perl/Tk Tutorial - Create GUI with Perl's Tk Module. If you are using Ubuntu, a easy way of installing Perl/Tk is. Perl/Tk Tutorial - Create GUI with Perl's Tk. How do I install a perl module in Ubuntu 12.04? What all do I need to install, and how do I install it/them? 12.04 software-installation perl.

I had similar issues with them both, so first I've put the pre-requisites and then I'll explain the problem later. Prerequisites for Ubuntu 6 (Dapper Drake) From a clean install of Ubuntu none of the development packages or libraries are installed. The following commands will install them so that we can then use CPAN to install the required modules. Apt-get install build-essential apt-get install lynx apt-get install curl apt-get install tk8.4-dev Prerequisite for Fedora FC5 I had already chosen the development packages during the install process. If you did not then you should go into Add/Remove Programs and then add the make and related packages.

Install Perl Linux

Perl tk module

You may also need to install the Tk development libraries. Installing the Perl/Tk module (Perl::Tk) My first attempt at installing the module went as follows: perl -MCPAN -e 'install Tk' If this is the first time you've used CPAN then you will be asked a number of questions. You can normally just take the defaults, answering your own country for the repositories etc.

The install went OK until was performing the tests on the module. The last few lines of the command are shown below.

T/widget.ok t/wm-time.ok t/wm.ok t/X.ok t/zzHList.ok t/zzPhoto.ok t/zzScrolled.ok 1/94# Test 66 got: '589x341+0+32' (t/zzScrolled.t at line 104 fail #2) # Expected: '589x341+0+0' (Sizechk: geometry has not changed not reset for -height = 24+(5)) # t/zzScrolled.t line 104 is: ok($newgeo, $oldgeo, 'Sizechk: geometry has not changed not reset'. # Test 94 got: '589x341+17+32' (t/zzScrolled.t at line 104 fail #4) # Expected: '589x341+0+32' (Sizechk: geometry has not changed not reset for -width = 80+(5)) t/zzScrolled.FAILED tests 66, 94 Failed 2/94 tests, 97.87% okay t/zzText.ok t/zzTixGrid.ok Failed Test Stat Wstat Total Fail Failed List of Failed - t/JP.t 0 11 294 582 197.96% 4-294 t/KR.t 0 11 271 534 197.05% 5-271 t/zzScrolled.t 94 2 2.13% 66 94 (3 subtests UNEXPECTEDLY SUCCEEDED), 23 subtests skipped. Failed 3/47 test scripts, 93.62% okay. 560/2619 subtests failed, 78.62% okay. Make:. testdynamic Error 255 There appear to be a few issues with the zzScrolled function.

I couldn't find any reason for this, and earlier questions on the topic resulted in no reply. I therefore decided to try and use a force to install regardless of the test.

Install using perl -MCPAN -e shell force install Tk Whch then resulted in the following. Installing /usr/bin/tkjpeg Installing /usr/bin/ptksh Installing /usr/bin/gedi Installing /usr/bin/ptked Writing /usr/local/lib/perl/5.8.7/auto/Tk/.packlist Appending installation info to /usr/local/lib/perl/5.8.7/perllocal.pod /usr/bin/make install - OK Failed during this command: NI-S/Tk-804.027.tar.gz: maketest FAILED but failure ignored because 'force' in effect At this point the module has loaded.

It appears to be working OK with my current program, even the bit that uses the scrolled wrapper. Hopefully it is working OK. Another thing I was looking at was instructions for using a Live CD. Obviously if there are problems installing the modules this is not going to work well as a Live CD. Fortunately Knoppix (the original Live CD distribution), includes the perl/tk module, at least it does on the DVD version - I haven't tried the CD version yet. So it still looks as though I will be able to create Live CD/DVD instructions for those that are new to Linux, although it won't be using the Ubuntu Live CD which is the one I originally hoped to use.

On Unix: usually you start cpan in your shell: # cpan and type install Chocolate::Belgian or in short form: cpan Chocolate::Belgian On Windows: If you're using ActivePerl on Windows, the has much of the same functionality as CPAN.pm. Example: # ppm ppm search net-smtp ppm install Net-SMTP-Multipart see in the CPAN FAQ Many distributions ship a lot of perl modules as packages. Gentoo: category. Debian: apt-cache search 'perl$' You should always prefer them as you benefit from automatic (security) updates and the ease of removal.

This can be pretty tricky with the cpan tool itself. For Gentoo there's a nice tool called which builds/installs the module from CPAN and creates a Gentoo package for you. Try: # cpanm Chocolate::Belgian It's great for just getting stuff installed. It provides none of the more complex functionality of CPAN or CPANPLUS, so it's easy to use, provided you know which module you want to install.

If you haven't already got cpanminus, just type: # cpan App::cpanminus to install it. It is also possible to install it without using cpan at all.

The basic bootstrap procedure is, curl -L perl - -sudo App::cpanminus For more information go to the App::cpanminus page and look at the section on installation. I note some folks suggesting one run cpan under sudo. That used to be necessary to install into the system directory, but modern versions of the CPAN shell allow you to configure it to use sudo just for installing.

This is much safer, since it means that tests don't run as root. If you have an old CPAN shell, simply install the new cpan ('install CPAN') and when you reload the shell, it should prompt you to configure these new directives. Nowadays, when I'm on a system with an old CPAN, the first thing I do is update the shell and set it up to do this so I can do most of my cpan work as a normal user. Also, I'd strongly suggest that Windows users investigate. This is a version of Perl that comes packaged with a pre-configured CPAN shell as well as a compiler.

It also includes some hard-to-compile Perl modules with their external C library dependencies, notably XML::Parser. This means that you can do the same thing as every other Perl user when it comes to installing modules, and things tend to 'just work' a lot more often. A couple of people mentioned the cpan utility, but it's more than just starting a shell. Just give it the modules that you want to install and let it do it's work. $prompt cpan Foo::Bar If you don't give it any arguments it starts the CPAN.pm shell. This works on Unix, Mac, and should be just fine on Windows (especially Strawberry Perl).

Install Perl On Ubuntu

There are several other things that you can do with the cpan tool as well. Here's a summary of the current features (which might be newer than the one that comes with CPAN.pm and perl): -a Creates the CPAN.pm autobundle with CPAN::Shell-autobundle.A module module.

Shows the primary maintainers for the specified modules -C module module. Show the Changes files for the specified modules -D module module.

Perl Tk Module

Show the module details. This prints one line for each out-of-date module (meaning, modules locally installed but have newer versions on CPAN). Each line has three columns: module name, local version, and CPAN version.L author author. List the modules by the specified authors.h Prints a help message.O Show the out-of-date modules.r Recompiles dynamically loaded modules with CPAN::Shell-recompile.v Print the script version and CPAN.pm version.

This works for Debian too, as well as any other Debian derivative. The missing piece is what to do when apt-cache search doesn't find something. $ sudo apt-get install dh-make-perl build-essential apt-file $ sudo apt-file update Then whenever you have a random module you wish to install: $ cd /some/path $ dh-make-perl -build -cpan Some::Random::Module $ sudo dpkg -i libsome-random-module-perl-0.01-1i386.deb This will give you a deb package that you can install to get Some::Random::Module. One of the big benefits here is man pages and sample scripts in addition to the module itself will be placed in your distro's location of choice. If the distro ever comes out with an official package for a newer version of Some::Random::Module, it will automatically be installed when you apt-get upgrade.