msinfo has asked for the wisdom of the Perl Monks concerning the following question:

Hi, monks

I am not able to install Goo::Canvas. Below are the steps I followed on my Ubuntu 12.10. I am new to Gtk and Perl Modules

perl -MCPAN -e shell cpan>install Goo::Canvas

This produced below error:

MakeMaker FATAL: prerequisites not found. ExtUtils::Depends not installed ExtUtils::PkgConfig not installed Please install these modules first and rerun 'perl Makefile.PL'.

so I tried

cpan> install ExtUtils::Depends cpan> install ExtUtils::PkgConfig

But again below error happened:

Result: PASS XAOC/ExtUtils-Depends-0.306.tar.gz /usr/bin/make test -- OK Running make install !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! ERROR: Can't create '/usr/local/man/man3' mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.14/E +xtUtils/Install.pm line 494 Result: PASS XAOC/ExtUtils-PkgConfig-1.15.tar.gz /usr/bin/make test -- OK Running make install !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! ERROR: Can't create '/usr/local/man/man3' mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.14/E +xtUtils/Install.pm line 494

Regards

Replies are listed 'Best First'.
Re: Goo::Canvas installation on Ubuntu 12.10
by farang (Chaplain) on Jan 12, 2014 at 01:51 UTC

    It appears you are trying to update the system Perl by using CPAN. This is not recommended, as you run the risk of messing up system tasks which use Perl. If you want to use the system Perl, try to stick with installation from packages if possible. That would be the simplest but not the most flexible.

    sudo apt-get install libgoo-canvas-perl
    Alternatively and probably better longterm but taking a little more work, you can install a second version of Perl into a separate directory (even a user directory without needing any root access) and update the new Perl all you want using CPAN without affecting the system Perl.

Re: Goo::Canvas installation on Ubuntu 12.10
by zentara (Cardinal) on Jan 12, 2014 at 13:10 UTC
    As farang said, using apt-get with sudo is better on Ubuntu systems. Your prerequisite errors are probably due to not having the Gtk2 or Gtk3 libraries properly installed. The Perl Goo Canvas has various version levels, and at some point it switched to Gtk3.

    So, you probably need the Ubuntu Gtk3 c libraries and their associated header files( dev packages). The Goo Canvas c library needs a few associated Gtk3 libs like Glib, Cairo, etc. , and you normally would have to install them in a specific order; but apt-get with sudo should get the prerequisites for you on Ubuntu.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
Re: Goo::Canvas installation on Ubuntu 12.10
by Anonymous Monk on Jan 12, 2014 at 01:16 UTC

      @Anonymous Monk: Why am I getting permission denied error? I am the only user on this system, with admin rights. If I remember correctly I have installed, few modules before, like this, and never encountered permission denied problem.

      @farang: Thanks, I never knew, about installing perl modules, your way.

      Thanks, for looking into this, I could use Goo::Canvas in my Perl code now.

        Anonymous Monk: Why am I getting permission denied error? I am the only user on this system, with admin rights.

        Figure it out

        mkdir '/usr/local/man/man3' or die Fudge(); use Errno; sub Fudge { my @r; while( my($k,$v)=each %!){ $v and push @r, $k } join qq/\n/, int($!).q/ /.$!, int($^E).q/ /.$^E, @r, q/ / }