PHP gd jpeg error - library is X, caller expects Y

It is possible that you will have a problem with PHP and GD library after doing an update in DirectAdmin.

In Apache error log, you could see this error:

Wrong JPEG library version: library is 80, caller expects 62

To fix this issue, follow this procedure: 

1) pkg delete gd from ports, pkg add again, then symlink the gd*.h in the /usr/local/include to /usr/local/lib.

2) Enter into your custombuild directory:  cd /usr/local/directadmin/custombuild

3) Modify configure/ap2/configure.php5 to have this line:


4) ./build libjpeg and then ./build php n


Instantly deploy a BSD cloud VPS with RootBSD

deploy instantly

  • Fast SSD hosting
  • Full root access
  • IPv6 and IPv4 enabled hosting
  • Over 25 data center locations worldwide
  • Friendly and knowledgeable support
  • Build with current FreeBSD, OpenBSD, NetBSD, Linux releases