Hi friends,
I want to install gd2 on my linux(centOS) system. I have download gd-2.0. file and I extract all files also. and read the readme file but not getting anything.
plz help me
Hi friends,
I want to install gd2 on my linux(centOS) system. I have download gd-2.0. file and I extract all files also. and read the readme file but not getting anything.
plz help me
Short answer: there are two practical ways to get GD2 working on CentOS — use your distribution packages (easiest, safest) or build the library from source (when you need a newer or specially configured lib). was right to point you at the repo route; it gives you the runtime, matching headers and any language bindings (PHP, Perl) without chasing dependencies. (command-not-found.com)
If you want the packaged route, install the runtime, the development headers and the PHP extension that matches your PHP build (the package names are typically gd, gd-devel and php-gd). If your OS PHP is old, enable a newer PHP repo (Remi/IUS/SCL) so the php-gd shipped matches your PHP version — mismatched php-gd is a common source of “extension not found” errors. (stackoverflow.com)
If you prefer to build from source (you mentioned a tarball), first install the development libraries for PNG, JPEG, FreeType and zlib so configure can detect support. A minimal example workflow (adjust package names for your CentOS/RHEL version) is:
# install build deps (example)
sudo yum install gcc make libpng-devel libjpeg-turbo-devel freetype-devel zlib-devel pkgconfig
# build GD from the source tarball
tar xzf gd-*.tar.gz
cd gd-*
./configure --prefix=/usr
make
sudo make install
sudo ldconfig Using --prefix=/usr will overwrite older system libs if that is your intention; otherwise let it install under the default /usr/local. The official GD docs explain the feature detection and prefix behavior. (libgd.github.io)
Troubleshooting tips: if a module installer (CPAN, pip, etc.) complains “Could not find gdlib-config” you likely need the gd-devel package (headers and gdlib-config). Use gdlib-config --features to see which image formats your installed libgd supports. If PHP’s GD fails to load, ensure the php-gd package matches the PHP binary and check for additional runtime deps (harfbuzz/libraqm for some font features). (command-not-found.com)
Why not using the repository?
yum install gd
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.