I'm trying to build a PHP8.1.8 lambda layer however i was following https://aws.amazon.com/blogs/apn/aws-lambda-custom-runtime-for-php-a-practical-example/
And just using the correct version, so the first thing I did was spin up a Node.JS Lambda in the console and output the process.versions, to identify the correct version of OpenSSL to use that reported openssl: '1.1.1n+quic'
so i changed the example they give to
curl -sL https://www.openssl.org/source/openssl-1.1.1q.tar.gz | tar -xvz
cd openssl-1.1.1q
./config && make && sudo make install
cd ~
And this seemingly worked, other than when i ran openssl version
i was getting an error about missing libssl.so.1.1 so i ran
sudo ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1
sudo ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
and if i now run openssl version
i get correctly reporting 1.1.1q
I then again changed the script from the blog to use PHP8.1.8 instead of 7 stuff and ran the below without any problem
mkdir ~/php-8-bin
curl -sL https://www.php.net/distributions/php-8.1.8.tar.gz | tar -xvz
cd php-8.1.8
./buildconf --force
however my problem is when i try and run ./configure --prefix=/home/ec2-user/php-8-bin/ --with-openssl=/usr/local/ssl --with-curl --with-zlib
i get error No package 'openssl' found
and i have absolutely no idea how to fix it.