Announcement

Collapse
No announcement yet.

Install Imager::Screenshot . Problems detecting libx11-dev

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Install Imager::Screenshot . Problems detecting libx11-dev

    The problem is that I cannot install Imager::Screenshot perl module. It tells me to install libx11-dev but libx11-dev "is already latest version" it says.

    Here is the log:

    Code:
    root@sebastian-gnome-desktop:~# ssh 192.168.1.100
    The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established.
    ECDSA key fingerprint is b8:62:6d:2c:13:22:21:c3:56:51:61:db:db:8f:04:6b.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '192.168.1.100' (ECDSA) to the list of known hosts.
    root@192.168.1.100's password: sebnie1177
    Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-14-generic i686)
    
     * Documentation: [url]https://help.ubuntu.com/[/url]
    
    Last login: Sat Dec 17 01:55:34 2011 from sebastian-gnome-desktop.sebn.us.to
    root@sebastian-kubuntu-desktop:~# apt-get install libx11-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    libx11-dev är redan den senaste versionen.
    0 att uppgradera, 0 att nyinstallera, 0 att ta bort och 0 att inte uppgradera.
    root@sebastian-kubuntu-desktop:~# perl -MCPAN -e shell;
    Terminal does not support AddHistory.
    
    cpan shell -- CPAN exploration and modules installation (v1.9800)
    Enter 'h' for help.
    
    cpan[1]> install Imager::Screenshot
    Reading '/root/.cpan/Metadata'
     Database was generated on Fri, 16 Dec 2011 21:29:04 GMT
    Running install for module 'Imager::Screenshot'
    Running make for T/TO/TONYC/Imager-Screenshot-0.011.tar.gz
    Checksum for /root/.cpan/sources/authors/id/T/TO/TONYC/Imager-Screenshot-0.011.tar.gz ok
    Scanning cache /root/.cpan/build for sizes
    ............................................................................DONE
    
     CPAN.pm: Building T/TO/TONYC/Imager-Screenshot-0.011.tar.gz
    
    Use of uninitialized value $description in concatenation (.) or string at Makefile.PL line 221.
    Could not find libX11.so ()
    Could not find windows.h (Win32 header)
    OS unsupported: Headers or libraries not found for a supported GUI
    
    Sorry, I can't find headers or libraries for a supported GUI
    You need to install development headers and libraries for your GUI
    For Win32: Platform SDK or a substitute
    For X11: X11 headers and libraries, eg. the libX11-dev package on Debian
    For OS X: Install Xcode
    
    Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
    'YAML' not installed, will not store persistent state
     TONYC/Imager-Screenshot-0.011.tar.gz
     /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
    Running make test
     Make had some problems, won't test
    Running make install
     Make had some problems, won't install
    Could not read metadata file. Falling back to other methods to determine prerequisites
    Failed during this command:
     TONYC/Imager-Screenshot-0.011.tar.gz     : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512
    
    cpan[2]> exit
    Terminal does not support GetHistory.
    Lockfile removed.
    root@sebastian-kubuntu-desktop:~# exit
    logout
    Connection to 192.168.1.100 closed.
    root@sebastian-gnome-desktop:~#
    Whats the problem?

    #2
    Re: Install Imager::Screenshot . Problems detecting libx11-dev

    All Linuxes Are The Same?

    /Imager-Screenshot-0.011/README:
    Imager::Screenshot is a module that grabs an image from a window under
    X11 or Win32...

    Tested under:

    - Win32 (VC++ 6.0)
    - Win32 (mingw)
    - Win32/X11 (cygwin as of Jan 1 2007)
    - X11 (Debian Linux)
    - Mac OS X 10.6.4.

    Not all the Debians are the same and/or not all the Ubuntus are the same.


    There has been changes in the lib paths:

    Maverick (http://packages.ubuntu.com/search?se...erick&arch=any)

    File: /usr/lib/libX11.so

    Natty & Oneiric (http://packages.ubuntu.com/search?se...natty&arch=any)

    File: /usr/lib/i386-linux-gnu/libX11.so or /usr/lib/x86_64-linux-gnu/libX11.so


    The Imager-Screenshot (http://search.cpan.org/~tonyc/Imager.../Screenshot.pm) is looking the libX11.so from the wrong place.


    Ducktape
    (http://www.octanecreative.com/ducttape/duckvsduct.html)


    Before

    Code:
    :~$ ls -l /usr/lib/i386-linux-gnu/libX11.so
    lrwxrwxrwx 1 root root 15 2011-09-22 21:35 /usr/lib/i386-linux-gnu/libX11.so -> libX11.so.6.3.0
    Code:
    :~$ ls -l /usr/lib/libX11.so
    ls: cannot access /usr/lib/libX11.so: No such file or directory
    -->

    Code:
    /Imager-Screenshot-0.011$ perl Makefile.PL
    Use of uninitialized value $description in concatenation (.) or string at Makefile.PL line 221.
    Could not find libX11.so ()
    Could not find windows.h (Win32 header)
    OS unsupported: Headers or libraries not found for a supported GUI
    
    Sorry, I can't find headers or libraries for a supported GUI
    You need to install development headers and libraries for your GUI
    For Win32: Platform SDK or a substitute
    For X11: X11 headers and libraries, eg. the libX11-dev package on Debian
    For OS X: Install Xcode

    After

    Code:
    sudo ln -s /usr/lib/i386-linux-gnu/libX11.so /usr/lib/libX11.so
    Code:
    :~$ ls -l /usr/lib/libX11.so
    lrwxrwxrwx 1 root root 33 2011-12-17 12:21 /usr/lib/libX11.so -> /usr/lib/i386-linux-gnu/libX11.so
    -->

    Code:
    /Imager-Screenshot-0.011$ perl Makefile.PL
    Found X11
    Could not find windows.h (Win32 header)
    Checking if your kit is complete...
    Looks good
    Writing Makefile for Imager::Screenshot

    Note

    1) I have a 32 bit system -> i386-linux-gnu

    2) I only tested the first step: "perl Makefile.PL"


    Symlink/softlink - The Unix duct tape

    man ln (*1)

    Code:
    NAME
        ln - make links between files
    
    SYNOPSIS
        ln [OPTION]... [-T] TARGET LINK_NAME  (1st form)
        ln [OPTION]... TARGET         (2nd form)
        ln [OPTION]... TARGET... DIRECTORY   (3rd form)
        ln [OPTION]... -t DIRECTORY TARGET... (4th form)
    
    DESCRIPTION
        In the 1st form, create a link to TARGET with the name LINK_NAME. In the 2nd form, create a link to
        TARGET in the current directory. In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.
        Create hard links by default, symbolic links with --symbolic. When creating hard links, each TARGET
        must exist. Symbolic links can hold arbitrary text; if later resolved, a relative link is interpreted
        in relation to its parent directory.
    ...
        -s, --symbolic
           make symbolic links instead of hard links
    ...

    (*1) http://manpages.ubuntu.com/
    Have you tried ?

    - How to Ask a Question on the Internet and Get It Answered
    - How To Ask Questions The Smart Way

    Comment


      #3
      Re: Install Imager::Screenshot . Problems detecting libx11-dev

      Thanks. I was too on the idea of adding a symlink, but I couln't just find where it expected libX11.so
      Now I know, and now it works. Perfect.

      Comment

      Working...
      X