libjpeg problem (gd - php)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • beantant@googlemail.com

    libjpeg problem (gd - php)

    hi,

    i have been trying to get libjpeg working with gd & php on centos. php
    is compiled from source (with gd option) and when i try compiling
    libjpeg this happens:

    [root@moo jpeg-6b]# ./configure --prefix=/usr --enable-shared
    .....
    .....
    -no errors

    [root@moo jpeg-6b]# make
    .....
    -no errors

    [root@moo jpeg-6b]# make install
    /usr/bin/install -c -m 644 ./cjpeg.1 /usr/man/man1/cjpeg.1
    /usr/bin/install: cannot create regular file `/usr/man/man1/cjpeg.1':
    No such file or directory
    make: *** [install] Error 1




    as i can not finish installing libjpeg, i can not specify the
    --with-jpeg-dir parameter when i configure php, so i cannot use gd's
    jpeg functions.


    gdinfo() returns:
    ============
    [GD Version] => bundled (2.0.28 compatible)
    [FreeType Support] =>
    [T1Lib Support] =>
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPG Support] =>
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] =>
    [XBM Support] => 1
    [JIS-mapped Japanese Font Support] =>
    ============

    so i cannot use imagecreatefrom jpeg()


    i also tried doing yum install libjpeg-devel, didn't help


    i would appreciate if someone can give some pointers as i am totally
    lost.

    thanks.

  • Erwin Moller

    #2
    Re: libjpeg problem (gd - php)

    beantant@google mail.com wrote:
    [color=blue]
    > hi,
    >
    > i have been trying to get libjpeg working with gd & php on centos. php
    > is compiled from source (with gd option) and when i try compiling
    > libjpeg this happens:
    >
    > [root@moo jpeg-6b]# ./configure --prefix=/usr --enable-shared
    > ....
    > ....
    > -no errors
    >
    > [root@moo jpeg-6b]# make
    > ....
    > -no errors
    >
    > [root@moo jpeg-6b]# make install
    > /usr/bin/install -c -m 644 ./cjpeg.1 /usr/man/man1/cjpeg.1
    > /usr/bin/install: cannot create regular file `/usr/man/man1/cjpeg.1':
    > No such file or directory
    > make: *** [install] Error 1
    >
    >[/color]

    Judging by the path, that is just a man-page-entry that screws up.

    If you are in a huury I suggest you try:
    1) create a directory named /usr/man/man1
    2) chmod 777
    3) make it again.

    4) optional: delete the directory.

    Not sure, but you could try.
    If PHP keeps complaining, dive into man(ual) pages setup for the
    compileoptions. (Not my expertise).
    Maybe you can give it somewhere the path were you store your manpages.

    Good luck,
    Regards,
    Erwin Moller
    [color=blue]
    >
    >
    > as i can not finish installing libjpeg, i can not specify the
    > --with-jpeg-dir parameter when i configure php, so i cannot use gd's
    > jpeg functions.
    >
    >[/color]

    Comment

    • beantant@googlemail.com

      #3
      Re: libjpeg problem (gd - php)

      Hi,

      Thanks for your suggestion. Unfortunately for some reason mkdir fails
      when trying to create /usr/man/man1

      I have tried removing the --prefix=/usr from the configure line just to
      see if it would do anything, and it actually solved the problem :)
      libjpeg got installed in /usr/local/lib and i used
      --with-jpeg-dir=/usr/local/lib in the php configure switch to get it
      working.


      Thanks

      Comment

      • Erwin Moller

        #4
        Re: libjpeg problem (gd - php)

        beantant@google mail.com wrote:
        [color=blue]
        > Hi,[/color]

        Hi,
        [color=blue]
        >
        > Thanks for your suggestion. Unfortunately for some reason mkdir fails
        > when trying to create /usr/man/man1[/color]

        WHo owns the directory? You need to be in the same group, or be that user to
        have permissions to create a dir.
        (If unsure, try root if you own the machine.)
        [color=blue]
        >
        > I have tried removing the --prefix=/usr from the configure line just to
        > see if it would do anything, and it actually solved the problem :)
        > libjpeg got installed in /usr/local/lib and i used
        > --with-jpeg-dir=/usr/local/lib in the php configure switch to get it
        > working.[/color]

        Good!
        Glad you fixed that, and glad to be of help.
        The configoptions can be really too-much and are not always documented in a
        human readable way. ;-)

        Good luck.

        Reagrds,
        Erwin Moller
        [color=blue]
        >
        >
        > Thanks[/color]

        Comment

        Working...