简体   繁体   中英

Why AWS lambda custom php run time throw the error “error while loading shared libraries: libpng15.so.15: cannot open shared object file:…”?

I have created custom php-7.0.6 run time on EC2 instance of AWS, which uses Amazon Linux , using the following command :

./configure --prefix=/home/ec2-user/php-7-bin/ --without-pear --enable-shared=no --enable-static=yes --enable-phar --enable-json --disable-all --with-openssl --with-curl --enable-libxml --enable-simplexml --enable-xml --with-mhash --with-gd --enable-exif --with-freetype-dir --enable-mbstring --enable-sockets --enable-pdo --with-pdo-mysql --enable-tokenizer --with-zlib

when i use the binary file generated through this command, on a aws lambda configuration the lambda function throws a error with message like :

php: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory

Note: the binary file works fine on EC2 server while checking phpinfo() using this binary file.

Please help me out with this issue.
Thanks.

after spending too much time i came to know that it was my mistake.
i haven't used right ec2 instance described by AWS documentation.
After following steps properly php binary file get working.
the required configuration for lambda is AWS Lambda Configuration

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM