1.准备号依赖库
如zlib readline openssl ncurses等等
编译脚本
#!/bin/bash
set -e
ROOT_DIR=/home/xxx/test/ins_py3
BASE_PATH=/home/xxx/test/usr
export CC=arm-fsl-linux-gnueabi-gcc
export CXX=arm-fsl-linux-gnueabi-g++
export AR=arm-fsl-linux-gnueabi-ar
export RANLIB=arm-fsl-linux-gnueabi-ranlib
export LD=arm-fsl-linux-gnueabi-ld
#export STRIP=arm-linux-gnueabi-strip
#export STRINGS=arm-linux-gnueabi-strings
export READELF=arm-fsl-linux-gnueabi-readelf
export CFLAGS="-I$BASE_PATH/include"
export CPPFLAGS="-I$BASE_PATH/include"
export LDFLAGS="-L$BASE_PATH/lib"
./configure --prefix=/usr --build=arm --host=arm-linux --disable-ipv6 ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=yes
make
make install DESTDIR=$ROOT_DIR
ubuntu16.04
sudo apt-get install -y gcc make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev