hakeem777 Posted April 27, 2010 Share Posted April 27, 2010 Hi, I am running CentOS Linux ver 4.4 and found that I have "gd-devel-2.0.28-4.4E.1" package installed. This is a GD library, I supposed. However when I generate the result from phpinfo(), I cannot find the GD section. In addition, when I tried to call gd_info() in the code, it gives error message " undefined function ..." I thought, since "gd-devel-2.0.28-4.4E.1" is installed, I should be able to use GD function. But obviously I am wrong. How can I let php to use GD in my scenario? Thanks. Regards, Quote Link to comment Share on other sites More sharing options...
anups Posted April 27, 2010 Share Posted April 27, 2010 You need to install php extension of GD, you can install from repository use following command yum install php-gd OR yum install php5-gd Quote Link to comment Share on other sites More sharing options...
hakeem777 Posted April 28, 2010 Author Share Posted April 28, 2010 Thanks for the advice. I have tried to run yum command but my server is blocked from outside and therefore it didn't work. Any other way? Thanks. Quote Link to comment Share on other sites More sharing options...
gizmola Posted April 28, 2010 Share Posted April 28, 2010 Somehow you have to get the package file. Yum allows automatic retrieval of .rpm files from one or more repositories, but you can also grab the .rpm files manually and install them with yum or rpm. However, I don't see how you can get them if you don't have internet access. Quote Link to comment Share on other sites More sharing options...
hakeem777 Posted April 28, 2010 Author Share Posted April 28, 2010 In fact, I have internet at my PC where I can download the rpm. I have downloaded this php-gd-5.2.6-2.i386.rpm and run rpm -ivh on this rpm file. However, I got error message of dependancies of a lot of files. I think the depended files are already installed in my linux. But still give me complaints. Can anyone please help? Thanks. Quote Link to comment Share on other sites More sharing options...
trq Posted April 28, 2010 Share Posted April 28, 2010 You'll need to download the dependencies (rpms) also. Why is this machine not connected to the Wan? Quote Link to comment Share on other sites More sharing options...
hakeem777 Posted April 28, 2010 Author Share Posted April 28, 2010 I can find the dependent files are located at other directories. Is there a path which I can setup in CentOS 4.4 so that rpm can recognize the dependent files? Thanks. Quote Link to comment Share on other sites More sharing options...
trq Posted April 28, 2010 Share Posted April 28, 2010 If the dependencies are indeed installed rpm should find them and they will no longer show up as failed deps. Quote Link to comment Share on other sites More sharing options...
hakeem777 Posted April 28, 2010 Author Share Posted April 28, 2010 I understand. However, it really happened that I could find file required existed in another directories but rpm cannot recognize it. Is there a path variable which I should set? Otherwise, how does system where to look for the depencies files? Thanks. Quote Link to comment Share on other sites More sharing options...
trq Posted April 28, 2010 Share Posted April 28, 2010 I'm not sure how rpm works exactly but most package managers keep a cache of installed applications or they look where the dependencies should be to see if they are there at install time. All an rpm file is is an archive containing all the relevent binaries + some meta data telling the system where to put them and what (if any) configuration changes need to be made. Maybe these dependencies that your sure are there where installed manually not using the package manager? This would prevent the package manager from knowing of there existence. Its generally not the best practice to mix a system with packages installed by a package manager and software installed manually unless you really know what you are doing. The dependencies that you say you have, are they in the location that rpm expects them to be in? Try.... rpm -qpR php-gd-5.2.6-2.i386.rpm To see what you require and the location they should be in. If this outputs that you require /usr/bin/foo (package manager installed) and you indeed have /usr/local/bin/foo (manually installed) installed you may be able to fix the issue using symlinks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.