Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Error building the php layer #26

Open
jcombrex opened this issue Jan 31, 2019 · 5 comments
Open

Error building the php layer #26

jcombrex opened this issue Jan 31, 2019 · 5 comments

Comments

@jcombrex
Copy link

jcombrex commented Jan 31, 2019

Hello,

Thank you for the work on this lambda layer, this will be super useful for many people.

I'm trying to customize the php layer but when I compile it I get this error:

cp: cannot stat ‘/usr/lib64/libedit.so.0’: No such file or directory

The problem is located in the build.sh : cp /usr/lib64/libedit.so.0 lib/
It seems like the libedit.so.0 file does not exist in the image, yet I'm using the same lambci/lambda:build-nodejs8.10 and build.sh (with yum install -y php71-cli zip) you're using.

Any idea what I'm missing? Thank you!

@txase
Copy link
Member

txase commented Feb 6, 2019

I'm not sure why it isn't working for you. I was able to build the image again just fine.

@code-runner-2017
Copy link
Contributor

code-runner-2017 commented Feb 6, 2019

You can open a bash shell in the docker container:

docker run --rm -it -v `pwd`:/opt/layer lambci/lambda:build-nodejs8.10 /bin/bash

and execute the build.sh line by line to track your problem. Do you get any error while executing the build commands? Before doing that, try to delete the image and download it again.

@MashaFomina
Copy link

MashaFomina commented Feb 12, 2019

Hello, I have the same error on latest version of lambci/lambda:build-nodejs8.10.
/opt/bin/php: error while loading shared libraries: libedit.so.0: cannot open shared object file: No such file or directory
During executing build-php-remi.sh manually I get this error (in system no libedit):
cp: cannot stat ‘/usr/lib64/libedit.so.0’: No such file or directory

The reinstallation of packages solved this error:
yum reinstall -y libedit libedit-devel

But my own runtime not work:
Fatal error: Uncaught Error: Call to undefined function curl_init() in /opt/bootstrap:72

@pcfreak30
Copy link

pcfreak30 commented Feb 23, 2019

force reinstalling libedit works.

However, there are some wrong assumptions regarding file paths that cause the ini and extensions to not load. Still doing experiments as the latest release doesn't have mysqli loaded already.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@pcfreak30 @txase @jcombrex @MashaFomina @code-runner-2017 and others