libjpeg problem (gd - php)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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 imagecreatefromjpeg()

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

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


Re: libjpeg problem (gd - php) wrote:

Quoted text here. Click to load it

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,
Erwin Moller

Quoted text here. Click to load it

Re: libjpeg problem (gd - php)


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


Re: libjpeg problem (gd - php) wrote:

Quoted text here. Click to load it


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.)

Quoted text here. Click to load it

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.

Erwin Moller

Quoted text here. Click to load it

Site Timeline