Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 26
New to linux, I am using the guide to installing apache, php, and gd found here: http://www.linuxguruz.org/z.php?id=31 Apache and gd configured, compiled, and installed fine. For PHP, the guide suggested ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2003
    Posts
    16

    Installing PHP with GD support on RHL8.0


    New to linux, I am using the guide to installing apache, php, and gd found here: http://www.linuxguruz.org/z.php?id=31

    Apache and gd configured, compiled, and installed fine.

    For PHP, the guide suggested using the configuration options:
    ./configure \
    --with-apxs=/usr/local/apache/bin/apxs \
    --with-config-file-path=/usr/local/apache/conf \
    --enable-versioning \
    --with-mysql=/usr/local \
    --enable-ftp \
    --with-gd=/usr/local/gd-2.0.11 \
    --enable-bcmath \
    --disable-debug \
    --enable-memory-limit=yes \
    --enable-track-vars
    I hit enter and it does its thing. However, I end up with the following:
    checking for T1lib support... yes
    checking whether to enable truetype string function in GD... yes
    If configure fails try --with-jpeg-dir=
    If configure fails try --with-png-dir= and --with-zlib-dir=
    If configure fails try --with-xpm-dir=
    If configure fails try --with-freetype-dir=
    configure: error: Unable to find libgd.(a|so) anywhere under /usr/local/gd-2.0.11
    and drops to the shell prompt.

    The error complains that there is no /usr/local/gd-2.0.11/libgd.a or .so file. I checked and the only libgd* file was a .la file. I open this file and I see:
    # libgd.la - a libtool library file
    # Generated by ltmain.sh - GNU libtool 1.4.3 (1.922.2.110 2002/10/23 01:39:54)
    #
    # Please DO NOT delete this file!
    # It is necessary for linking the library.
    # The name that we can dlopen(3).
    dlname='libgd.so.2'
    # Names of this library.
    library_names='libgd.so.2.0.0 libgd.so.2 libgd.so'
    # The name of the static archive.
    old_library='libgd.a'
    Would this be a copy of the file its looking for? Would it be safe to copy it it to libgd.so or .a then try the ./configure command again?? What about the "If configure fails try..."?? Is that meant for the error I'm getting or for the check it did for the truetype string function in GD?

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    It's certainly not what it's looking for. .so and .a files are binary subroutine libraries (dynamically and statically linked, respectively). The .la file is just a description of how to link programs against them. (If you want to know more about libraries and linking, see my (very) brief explanation in this post.)

    I don't know why they weren't installed, though. Are you really sure that gd installed correctly? What is gd, btw.? (You can't keep up to date with _everything_... =) )

  3. #3
    Just Joined!
    Join Date
    Feb 2003
    Posts
    16
    Yes GD did install fine without errors

    GD:
    GD Graphics Library
    An ANSI C library for the dynamic creation of images. GD creates PNG and JPEG images, among other formats. GD does not create GIF images.

    http://www.boutell.com/gd/

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Run make install for gd once more, log the output, as in "make install >makelog 2>&1", then post the output of "grep \\.so makelog" here.

  6. #5
    Just Joined!
    Join Date
    Feb 2003
    Posts
    16
    [root@localhost gd-2.0.11]# make install >makelog 2>&1
    [root@localhost gd-2.0.11]# grep \\.so makelog
    /usr/bin/install -c .libs/libgd.so.2.0.0 /usr/local/lib/libgd.so.2.0.0
    (cd /usr/local/lib && rm -f libgd.so.2 && ln -s libgd.so.2.0.0 libgd.so.2)
    (cd /usr/local/lib && rm -f libgd.so && ln -s libgd.so.2.0.0 libgd.so)
    - have your system administrator add LIBDIR to `/etc/ld.so.conf'
    more information, such as the ld(1) and ld.so( manual pages.
    [root@localhost gd-2.0.11]#

    I opened the /etc/ld.so.conf file, but am i supposed to add LIBDIR? or some other directory? /usr/local/lib/?

  7. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Oh yes, that's it, of course. Many distribution, for some reason, ship /etc/ld.so.conf without /usr/local/lib in it. I never remember it since I think it's so illogical.
    Add /usr/local/lib to /etc/ld.so.conf, then run ldconfig, and try again.

  8. #7
    Just Joined!
    Join Date
    Feb 2003
    Posts
    16
    i added

    /usr/local/lib

    to /etc/ld.so.conf, then ran ldconfig, then tried php ./configure again, but it still stopped at the same error...

    configure: error: Unable to find libgd.(a|so) anywhere under /usr/local/gd-2.0.11


    I'm tempted to just move /usr/local/lib/libgd.a/.so to /usr/local/gd-2.0.11/ but then i take a peak at the libgd.la file i mentioned earlier and in the last line it states:

    # Directory that this library needs to be installed in:
    libdir='/usr/local/lib'

    is there any way i can specify where this libgd.a and .so file is??

  9. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Hmmm... it would seem that the solution is really closer than that. If you look at your configure command line, you'll see this:
    ./configure \
    --with-apxs=/usr/local/apache/bin/apxs \
    --with-config-file-path=/usr/local/apache/conf \
    --enable-versioning \
    --with-mysql=/usr/local \
    --enable-ftp \
    --with-gd=/usr/local/gd-2.0.11 \
    --enable-bcmath \
    --disable-debug \
    --enable-memory-limit=yes \
    --enable-track-vars
    Maybe that rings a bell? =)

  10. #9
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    he is trying to say that should be:
    Code:
    --with-gd=/usr/local/
    or possibly (less likely)
    Code:
    --with-gd=/usr/local/lib
    I respectfully decline the invitation to join your delusion.

  11. #10
    Just Joined!
    Join Date
    Feb 2003
    Posts
    16
    i tried modifying the configuration to:

    Code:
    --with-gd=/usr/local/
    It did more checking, but then stopped and returned with:

    checking whether time.h and sys/time.h may both be included... yes
    checking for uid_t in sys/types.h... (cached) yes
    checking for type ulong... yes
    checking for type uchar... no
    checking for type uint... yes
    checking for type ushort... yes
    checking for int8... no
    checking base type of last arg to accept... socklen_t
    checking return type of qsort... void
    configure: error: Cannot find header files under /usr/local
    I then tried
    Code:
    --with-gd=/usr/local/lib
    but this stopped somewhere between where it originally stopped and where it stopped when i tried--with-gd=/usr/local and came back with an error stating it could not find gd.h. I checked and it was in the /usr/local/gd-2.0.11/ directory =/.

    What header files is it trying to look for in /usr/local ?


Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •