Skip to content

Instantly share code, notes, and snippets.

@primerano
primerano / install_python_36_amazon_linux.sh
Last active March 9, 2021 18:27 — forked from niranjv/install_python_36_amazon_linux.sh
Install Python 3.6 in Amazon Linux
# A virtualenv running Python3.6 on Amazon Linux/EC2 (approximately) simulates the Python 3.6 Docker container used by Lambda
# and can be used for developing/testing Python 3.6 Lambda functions
# This script installs Python 3.6 on an EC2 instance running Amazon Linux and creates a virtualenv running this version of Python
# This is required because Amazon Linux does not come with Python 3.6 pre-installed
# and several packages available in Amazon Linux are not available in the Lambda Python 3.6 runtime
# The script has been tested successfully on a t2.micro EC2 instance (Root device type: ebs; Virtualization type: hvm)
# running Amazon Linux AMI 2017.03.0 (HVM), SSD Volume Type - ami-c58c1dd3
# and was developed with the help of AWS Support
Curl development headers with SSL support... not found
If I remove the unlink of the /tmp/passenger-curl-check.c (from passenger-3.0.0.pre2/lib/phusion_passenger/dependencies.rb) and run the compile command directly I get IDN errors
gcc -o '/tmp/passenger-curl-check' '/tmp/passenger-curl-check.c' -lcurl
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `idna_to_ascii_lz@LIBIDN_1.0'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `tld_strerror@LIBIDN_1.0'
......