Re: using cpan effectively

Discussion in 'Perl Misc' started by Mart van de Wege, Aug 15, 2012.

  1. Cal Dershowitz <> writes:
    >
    > [can only paste as quotation]
    >> CPAN.pm: Going to build J/JC/JCRISTY/PerlMagick-6.77.tar.gz
    >>
    >> Checking if your kit is complete...
    >> Looks good
    >> Note (probably harmless): No library found for -lMagickCore

    >
    > ...
    >> Magick.xs:60:31: fatal error: magick/MagickCore.h: No such file or directory
    >> compilation terminated.

    >
    > They give a help link at cpan, and I didn't see this issue there.
    >

    The error message speaks for itself: the build process can't find a
    library. That means that something is missing in your install.

    If you check the URL mentioned in the Image::Magick module
    documentation, you'd find an URL to the home page of the extension,
    where it is specifically stated:

    ImageMagick must already be installed on your system.

    So, it seems that you should install ImageMagick first.

    Mart

    --
    "We will need a longer wall when the revolution comes."
    --- AJS, quoting an uncertain source.
     
    Mart van de Wege, Aug 15, 2012
    #1
    1. Advertising

  2. Cal Dershowitz <> writes:

    > On 08/15/2012 01:17 AM, Mart van de Wege wrote:
    >> install ImageMagick

    >
    > [x-posted to alt.os.linux.ubuntu]
    >
    > I tried hard today but failed. I understand that people don't want to
    > see logs. I mean other people, usually the barkey ones. I don't find
    > it unpleasant to read a log.
    >
    > Q1) Can anybody who has Imagemagick.h in a place that does something
    > useful tell me where it is on his/her installation?


    You have been told the answer. Make sure you have both ImageMagick and
    the development packages installed.

    You should be able to find out the exact commands yourself, instead of
    asking other people to do your homework for you.

    Mart
    --
    "We will need a longer wall when the revolution comes."
    --- AJS, quoting an uncertain source.
     
    Mart van de Wege, Aug 17, 2012
    #2
    1. Advertising

  3. magic installation woes [OT] (was: using cpan effectively)

    Cal Dershowitz <> writes:
    > On 08/15/2012 01:17 AM, Mart van de Wege wrote:
    >> install ImageMagick

    >
    > [x-posted to alt.os.linux.ubuntu]
    >
    > I tried hard today but failed. I understand that people don't want to
    > see logs. I mean other people, usually the barkey ones. I don't find
    > it unpleasant to read a log.
    >
    > Q1) Can anybody who has Imagemagick.h in a place that does something
    > useful tell me where it is on his/her installation?


    First, have you considered to install the Ubuntu package for the
    module in question? This should take care of installing any
    depedencies automatically and you won't even need the build
    dependencies. The Debian package is called 'perlmagic', cf

    ,----
    | [rw@sapphire]~ $sudo apt-cache search magick | grep perl
    | libgraphics-magick-perl - format-independent image processing - perl interface
    | perlmagick - Perl interface to the ImageMagick graphics routines
    | libchart-gnuplot-perl - module for generating two- and three-dimensional plots
    | libimage-size-perl - module for determining image sizes in several common formats
    `----

    It is generally a better idea to use software packaged by the
    distribution insofar available. You can spare yourself a lot of
    trouble if you don't use any 'upstream sources' directly except if you
    need specific features (or fixes) not yet available elsewhere or if
    you want or need to use them as base for independent developments (eg,
    the DBD::pg I'm presenty using as been significantly changed by me
    because I needed working support for asychronous database interactions
    and more differentiated error handling than die("It failed!"), two
    things of no particular concern to the people who maintain the public
    version).

    Assuming you still want to install the CPAN-version, the easiest way
    to deal with its build depedencies is to use the packaged versions for
    these. Since you want to compile something which uses this library,
    the library package alone won't do, you'll need the so-called
    development package as well. Again using apt-cache to search for
    likely suspects yields

    ,----
    | [rw@sapphire]~ $sudo apt-cache search magick | grep lib | grep -- -dev
    | graphicsmagick-libmagick-dev-compat - image processing librariesproviding ImageMagick interface
    | libgraphicsmagick++1-dev - format-independent image processing - C++ development files
    | libgraphicsmagick1-dev - format-independent image processing - C development files
    | libmagick++-dev - object-oriented C++ interface to ImageMagick - development files
    | libmagickcore-dev - low-level image manipulation library - development files
    | libmagickwand-dev - image manipulation library - development files
    | libvips-dev - image processing system good for very large images (dev)
    `----

    Since you were missing a library named MagickCore and a header of the
    same name, the candidate suggesting itself would be libmagickcore-dev.
    You can install that with

    apt-get install libmagickcore-dev

    This will install a bunch of other stuff the package maintainer
    considered to be necessary for using this package (which might or
    might not be true) or thought you should really be using for whatever
    reason (aka 'avahi-daemon' ...) but unless you're seriously short of
    diskspace or want/ need to control every detail, that's not worth
    bothering with.

    I usually disable automatic installation of 'recommended other
    packages' because I grew tired of deinstalling the avahi- and
    dbus-daemons over and over again :->. This can be done by creating a
    file /etc/apt/apt.conf with the following content (or by adding it to
    an existing apt.conf file)

    APT {
    Install-Recommends "false";
    };
     
    Rainer Weikusat, Aug 17, 2012
    #3
  4. Mart van de Wege

    ilovelinux Guest

    Re: magic installation woes [OT]

    23-AUG-2012 05:15:14 UTC+2 Cal Dershowitz wrote:

    > Q1) What does it mean to be "processing triggers?"
    >
    >
    > Processing triggers for man-db ...
    > Setting up libmagickwand4 (8:6.6.9.7-5ubuntu3.1) ...
    > Setting up imagemagick (8:6.6.9.7-5ubuntu3.1) ...
    > Setting up libnetpbm10 (2:10.0-15) ...
    > Setting up netpbm (2:10.0-15) ...
    > Processing triggers for libc-bin ...
    > ldconfig deferred processing now taking place
    >
    > Q2) What's that now? ^^^^


    Q1) As far as I have understood, triggers are an extension of the Debian package system that allows multiple packages to share the same post-install (postinst) actions.
    Some actions, like updating the whatis database (http://linux.die.net/man/8/makewhatis), are part the postinst script of a lot of packages, but only the last action is effective. Instead of performing the action again and again for each package, a package may register a trigger. The trigger will be performed only once at the end of the installation process. This may resultin a huge time gain.

    Q2) ldconfig is a means to specify to the dynaloader of the Linux kernel inwhich directories to search for shared object libraries. See http://linux.die.net/man/8/ldconfig.

    HTH
     
    ilovelinux, Aug 23, 2012
    #4
  5. Re: magic installation woes [OT]

    Cal Dershowitz <> writes:

    [...]

    > Q1) What does it mean to be "processing triggers?"


    [...]

    > Processing triggers for libc-bin ...
    > ldconfig deferred processing now taking place
    >
    > Q2) What's that now? ^^^^


    Please consider to stop crossposting general Linux-related questions
    to completely unrelated newsgroups.

    Answer: One part of the installation of a Debian package is running
    the so-called 'postinstall' script. As the name might suggest, this
    script runs after all files the package is composed of have been
    installed. Its purpose is to configure whatever needs to be configured
    in order to integrate the package into the system. One example of this
    is what the 'ldconfig deferred processing' refers to: Shared libraries
    can be installed in any number of different filesystem locations (in
    the most simple case, the system uses /lib and /usr/lib). Whenever a
    process using a particular shared library needs to be started, the
    file corresponding with this libray needs to be loaded in addition to
    the file containing the main program (simplification). Often, the same
    library is used by many running processes (eg, the C library is used
    by all of them). In order to avoid searching the filesystem for the
    same file still residing in the same location over and over again, the
    system maintains a cache which records the location of all installed
    shared libraries. Whenever a new shared library is installed, this
    cache needs to be updated so that the runtime linker knows where to
    find he corresponding file. This is accomplished by running the
    ldconfig command. When installing multiple shared libraries, running
    ldconfig once after all the files are installed is sufficient to
    update the cache. Because of this, a package which needs this doesn't
    run ldconfig directly from its postinstall script but 'triggers' a
    ldconfig run instead. This means it informs the installation system
    that ldconfig needs to be executed before this particular package will
    be in a usable state. The installation system records this fact and
    executes all actions triggered during installation of a series of
    packages after all of them have been installed.
     
    Rainer Weikusat, Aug 23, 2012
    #5
  6. Re: magic installation woes [OT]

    On 08/22/2012 11:15 PM, Cal Dershowitz wrote:
    > On 08/21/2012 04:07 AM, Cal Dershowitz wrote:
    >> On 08/19/2012 11:31 PM, Cal Dershowitz wrote:
    >>>
    >>> Since you were missing a library named MagickCore and a header of the
    >>> same name, the candidate suggesting itself would be libmagickcore-dev.
    >>> You can install that with
    >>>
    >>> apt-get install libmagickcore-dev

    >>
    >>
    >> $ sudo apt-get install libmagickcore-dev
    >> [sudo] password for fred:
    >> Reading package lists... Done
    >> Building dependency tree
    >> Reading state information... Done
    >> libmagickcore-dev is already the newest version.
    >> 0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
    >> $
    >>
    >> This is encouraging for me, because I've got 99 problems, and this is no
    >> longer one of them.

    >
    > , he said, without successful output.
    >
    > fred@fred-desktop:~/Desktop$ sudo apt-get install imagemagick
    > Reading package lists... Done
    > Building dependency tree
    > Reading state information... Done
    > The following extra packages will be installed:
    > libmagickwand4 libnetpbm10 netpbm
    > Suggested packages:
    > imagemagick-doc autotrace curl enscript ffmpeg gnuplot grads hp2xx
    > html2ps
    > libwmf-bin mplayer povray radiance texlive-base-bin transfig ufraw-batch
    > The following NEW packages will be installed:
    > imagemagick libmagickwand4 libnetpbm10 netpbm
    > 0 upgraded, 4 newly installed, 0 to remove and 12 not upgraded.
    > Need to get 1,611 kB of archives.
    > After this operation, 5,030 kB of additional disk space will be used.
    > Do you want to continue [Y/n]? y
    > ....
    >
    > Q1) What does it mean to be "processing triggers?"
    >
    > Processing triggers for man-db ...


    Setting up the info for 'man-db'... 'man' is a command-line program
    for reading program documentation (manuals). Open a terminal (make it
    fullscreen) and type:

    fred@fred-desktop:~/Desktop$ man man

    ....for a description of 'man' using 'man'.

    > Setting up libmagickwand4 (8:6.6.9.7-5ubuntu3.1) ...
    > Setting up imagemagick (8:6.6.9.7-5ubuntu3.1) ...
    > Setting up libnetpbm10 (2:10.0-15) ...
    > Setting up netpbm (2:10.0-15) ...
    > Processing triggers for libc-bin ...
    > ldconfig deferred processing now taking place
    >
    > Q2) What's that now? ^^^^


    Processing all the triggers set up earlier... man-db updates, maybe
    putting entries in the menus, etc.


    --
    Norman
    Registered Linux user #461062
    AMD64X2 6400+ Ubuntu 10.04 64bit
     
    Norman Peelman, Aug 23, 2012
    #6
  7. Re: magic installation woes [OT]

    Cal Dershowitz <> writes:
    > On 08/23/2012 03:47 AM, Rainer Weikusat wrote:
    >> Cal Dershowitz <> writes:
    >>
    >> [...]
    >>
    >>> Q1) What does it mean to be "processing triggers?"

    >>
    >> [...]
    >>
    >>> Processing triggers for libc-bin ...
    >>> ldconfig deferred processing now taking place
    >>>
    >>> Q2) What's that now? ^^^^

    >>
    >> Please consider to stop crossposting general Linux-related questions
    >> to completely unrelated newsgroups.
    >>
    >> Answer: One part of the installation of a Debian package is running
    >> the so-called 'postinstall' script.


    [...]

    > Das habe ich ueberhaupt nicht verstanden.


    "Wer hoeren will muss schweigen koennen".
     
    Rainer Weikusat, Aug 26, 2012
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carl d.
    Replies:
    1
    Views:
    411
    A. Sinan Unur
    May 10, 2005
  2. Replies:
    5
    Views:
    221
    Randy Kobes
    Oct 12, 2005
  3. Ben Bullock
    Replies:
    12
    Views:
    304
    Ben Bullock
    Jul 8, 2008
  4. SVCitian
    Replies:
    1
    Views:
    997
    SVCitian
    Oct 22, 2010
  5. Rainer Weikusat

    Re: using cpan effectively

    Rainer Weikusat, Aug 15, 2012, in forum: Perl Misc
    Replies:
    1
    Views:
    905
    J. Gleixner
    Sep 4, 2012
Loading...

Share This Page