LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   PHP GD problems: Missing libX11.so.6 => how to get it? (http://www.linuxquestions.org/questions/linux-general-1/php-gd-problems-missing-libx11-so-6-%3D-how-to-get-it-577217/)

BlackRabbit 08-15-2007 03:41 AM

PHP GD problems: Missing libX11.so.6 => how to get it?
 
Hi,

had some troubles with my newly installed Slackware 12.0 box. As this question is not Slack-specific, I choose to post it here..

I use this box for PHP developement (as it provides PHP 5.2 & MySQL 5.0). However, when testing my old (PHP 4.x) code on this box, I encountered problems whenever an image should be generated.

You can find a phpinfo()-copy of this server on the following page:
http://www.actua-forums.be/extra/phpinfo.html
As you can see, PHP is configured with '--with-gd=shared', so it should work, right? However, no 'GD' summary is shown on the page.

After some searching, I found out that I miss 2 files:
Code:

/usr/lib/php/extensions# ldd gd.so
        linux-gate.so.1 =>  (0xffffe000)
        libt1.so.5 => /usr/lib/libt1.so.5 (0xb7ebd000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7e50000)
        libX11.so.6 => not found
        libXpm.so.4 => not found

        libpng.so.3 => /usr/lib/libpng.so.3 (0xb7e15000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7e00000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7de0000)
        libc.so.6 => /lib/libc.so.6 (0xb7c9e000)
        libm.so.6 => /lib/libm.so.6 (0xb7c77000)
        /lib/ld-linux.so.2 (0x80000000)

I guess I could just copy these files to the correct directory, right?
In that case: where can I download this single files from?
If not, how can I find out which package I need to install in order to get it (and dependencies) right?


Important: this is a pretty old box (P1 233) without a lot of diskspace. Because of this, I prefer not to install to many things like a complete X11 environment :)

Thanks for the info

weibullguy 08-15-2007 05:44 AM

libX11.so.6 is a symlink to the most recent version of libX11 (libX11.so.6.2.0 on my machine). Same goes for libXpm.so.4, it's a link (libXpm.so.4.11.0 on my machine). Just create the links and you should be in business.

BlackRabbit 08-15-2007 05:57 AM

Quote:

Originally Posted by weibullguy (Post 2859505)
libX11.so.6 is a symlink to the most recent version of libX11 (libX11.so.6.2.0 on my machine). Same goes for libXpm.so.4, it's a link (libXpm.so.4.11.0 on my machine). Just create the links and you should be in business.

Code:

root@datanuke209:/usr/lib/php/extensions# find / -name "libX*"
root@datanuke209:/usr/lib/php/extensions#

As you can see, there is no file to symlink to :)
As said: the box does not have X11 (or any other window manager/GUI) installed..

Could you perhaps (rapid)share those files, so I can just copy them (& symlink them)? Or is that a bad idea?

weibullguy 08-15-2007 06:48 AM

Quote:

Originally Posted by BlackRabbit (Post 2859512)
As said: the box does not have X11 (or any other window manager/GUI) installed..

No you didn't.

Quote:

Originally Posted by BlackRabbit (Post 2859512)
Could you perhaps (rapid)share those files, so I can just copy them (& symlink them)? Or is that a bad idea?

You should be able to install just the missing X11 libraries if you use modular (i.e., >=Xorg-7.0) X Windows. You'll also need xtrans, libXdmcp, and libXau for libX11. libXt, libSM, and libICE are required for libXpm. Just copying mine may not work because I've compiled mine with the specific options I want.

BlackRabbit 08-15-2007 07:01 AM

Quote:

Originally Posted by weibullguy (Post 2859548)
No you didn't.

Quote:

Important: this is a pretty old box (P1 233) without a lot of diskspace. Because of this, I prefer not to install to many things like a complete X11 environment
But I guess this is not 100% clear :)

Quote:

You should be able to install just the missing X11 libraries if you use modular (i.e., >=Xorg-7.0) X Windows. You'll also need xtrans, libXdmcp, and libXau for libX11. libXt, libSM, and libICE are required for libXpm. Just copying mine may not work because I've compiled mine with the specific options I want.
Darn..
But is I can find someone with a standaard Slackware install, it should be ok just to copy these files?

TheLinuxDuck 07-25-2008 02:02 PM

Quote:

Originally Posted by weibullguy (Post 2859548)
No you didn't.

With all due respect, that is not true. Perhaps the words were not explicitly stated, but the original post made it very clear that X11 was not installed at all. This comment was totally unnecessary.

Now, the rest of the your reply was top notch! You gave not only the main libraries needed, but the names of all dependencies to provide support for those libraries. It would have taken me forever to determine that.

Quote:

Originally Posted by BlackRabbit (Post 2859559)
But is I can find someone with a standaard Slackware install, it should be ok just to copy these files?

I don't know if you've solved this yet, but I was in the exact same boat as you. Slack 12 without X11 installed, needed GD for web stuff.

Using the information given by weibullguy, I was able to get GD working just fine.
Just download and install these packages:

http://slackware.cs.utah.edu/pub/sla...3-noarch-1.tgz
http://slackware.cs.utah.edu/pub/sla...0.2-i486-1.tgz
http://slackware.cs.utah.edu/pub/sla...0.3-i486-1.tgz
http://slackware.cs.utah.edu/pub/sla...1.1-i486-4.tgz
http://slackware.cs.utah.edu/pub/sla...0.5-i486-1.tgz
http://slackware.cs.utah.edu/pub/sla...0.3-i486-1.tgz
http://slackware.cs.utah.edu/pub/sla...0.3-i486-1.tgz
http://slackware.cs.utah.edu/pub/sla...5.6-i486-1.tgz

Once they are installed, your GD should work just fine! It did for me. I didn't install them in any particular order. I just used pkgtool to 'install from the current directory'.

TLD

havenster 05-20-2009 05:14 PM

Nice list, I installed all of those, but required one more libxcb-xlib which is required by libXt. You can find it here:

http://slackware.cs.utah.edu/pub/sla...1.0-i486-2.tgz

kik.lozev 02-07-2010 09:01 AM

Hi there - as i had same problem in slack 13 and this was the first result in google about it.
There is another dependency (at least on slack 13):
libXdmcp-1.0.2-i486-2.txz
found again under x/ series of the install source


All times are GMT -5. The time now is 02:05 PM.