Centos7 安装 Playwright,踩坑记录

Centos7 安装 Playwright,踩坑记录 前置条件需具备Python3.7及以上环境这里使用3.11.01、安装Playwrighpip3 install playwright2、 安装Playwright内置浏览器python3 -m playwright install报错/lib64/libc.so.6: version GLIBC_2.28 not found/lib64/libstdc.so.6: version CXXABI_1.3.9 not found/lib64/libstdc.so.6: version GLIBCXX_3.4.21 not found解决一1.1、安装 GLIBC_2.28​cd /usr/local/ wget https://mirror.bjtu.edu.cn/gnu/libc/glibc-2.28.tar.xz --no-check-certificate tar -xf glibc-2.28.tar.xz cd glibc-2.28/ mkdir build cd build/ ../configure --prefix/usr/local/glibc-2.28报错分别是make bison compiler都太过老旧configure: error:*** These critical programs are missing or too old: make bison compiler*** Check the INSTALL file for required versions.解决1.1.1、升级GCC编译器yum -y install centos-release-scl yum -y install devtoolset-8-gcc devtoolset-8-gcc-c devtoolset-8-binutils scl enable devtoolset-8 bash echo source /opt/rh/devtoolset-8/enable /etc/profile source /etc/profile1.1.2、升级makewget http://ftp.gnu.org/gnu/make/make-4.2.tar.gz tar -xzvf make-4.2.tar.gz cd make-4.2 ./configure make make install rm -rf /usr/bin/make cp ./make /usr/bin/1.1.3、安装 bisonyum install -y bison再次编译安装GLIBCcd /usr/local/glibc-2.28/build/ ../configure --prefix/usr --disable-profile --enable-add-ons --with-headers/usr/include --with-binutils/usr/bin再次报错checking whether to use .ctors/.dtors header and trailer... configure: error: missing __attribute__ ((constructor)) support??解决1.1.4、在编排末尾加上libc_cv_ctors_headeryes参考文献在 LFS 2.28 中编译 Glibc 8.3 时出错 (linuxquestions.org)../configure --prefix/usr --disable-profile --enable-add-ons --with-headers/usr/include --with-binutils/usr/bin libc_cv_ctors_headeryes继续安装GLIBCmake报错缺少动态库文件-2.28/build/elf/dl-fxstatat64.os/usr/bin/ld: 找不到 -lssl/usr/bin/ld: 找不到 -lcryptocollect2: error: ld returned 1 exit status