1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

[Solved] Unable to load dynamic library '/opt/lib/php/gd.so

Discussion in 'Asuswrt-Merlin' started by amplatfus, Dec 16, 2018.

  1. amplatfus

    amplatfus Regular Contributor

    Joined:
    Nov 25, 2016
    Messages:
    160
    Location:
    RO
    Hi,

    After entware-ng update (src/gz packages pkg.entware.net/binaries/armv7) to entware (src/gz packages bin.entware.net/armv7sf-k2.6) using opkg update; opkg upgrade 2 times I am facing below PHP error:
    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/lib/php/gd.so' - libpng12.so.0: cannot open shared object file: No such file or directory in Unknown on line 0
    
    Could you please give me some hint to fix it?
    Thank you!
     
  2. amplatfus

    amplatfus Regular Contributor

    Joined:
    Nov 25, 2016
    Messages:
    160
    Location:
    RO
    I solve it in the meantime #happy :)

    Below are the steps in my case that worked.
    1. I list packages installed on my Entware:
    Code:
    [email protected]:/tmp/mnt/# opkg list-installed
    php5 - 5.6.26-1
    php5-cgi - 5.6.26-1
    php5-cli - 5.6.26-1
    php5-fastcgi - 5.6.26-1
    php5-mod-curl - 5.6.26-1
    php5-mod-gd - 5.6.26-1
    php5-mod-hash - 5.6.26-1
    php5-mod-json - 5.6.26-1
    php5-mod-mbstring - 5.6.26-1
    php5-mod-mcrypt - 5.6.26-1
    php5-mod-mysql - 5.6.26-1
    php5-mod-mysqli - 5.6.26-1
    php5-mod-openssl - 5.6.26-1
    php5-mod-pdo - 5.6.26-1
    php5-mod-pdo-mysql - 5.6.26-1
    php5-mod-pdo-pgsql - 5.6.26-1
    php5-mod-pdo-sqlite - 5.6.26-1
    php5-mod-session - 5.6.26-1
    php5-mod-simplexml - 5.6.26-1
    php5-mod-xml - 5.6.26-1
    php5-mod-zip - 5.6.26-1
    php7 - 7.2.9-1
    
    2. Then I uninstalled php5-mod-gd and installed php7-mod-gd.
    Code:
    [email protected]:/tmp/mnt/# opkg remove php5-mod-gd
    Removing package php5-mod-gd from root...
    [email protected]:/tmp/mnt/# opkg install php7-mod-gd
    Installing php7-mod-gd (7.2.9-1) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/php7-mod-gd_7.2.9-1_armv7-2.6.ipk
    Configuring php7-mod-gd.
    
    And the error gone away.
    Hope this helps!