太长不看版:
需要的话conda就完事了,但sra说是用ascp也不会快了
改glibc gcc后患无穷,一定要提前备份,我半个月后yum install个nlopt-devel这么无关紧要的操作都把系统内核干掉了,还不小心退出登录再也进不去,只好重装了系统,累了
ascp下载
搜索aspera connect并找到下载界面
复制链接地址
下载
wget --no-check-certificate https://d3gcli72yxqn2z.cloudfront.net/downloads/connect/latest/bin/ibm-aspera-connect_4.2.3.197_linux.tar.gz
ascp安装
tar -zvxf ibm-aspera-connect_4.2.3.197_linux.tar.gz
sh ibm-aspera-connect_4.2.3.197_linux.sh
安装位置很奇葩,是个隐藏目录~/.aspera/connect
vi ~/.bashrc
export PATH='~/.aspera/connect/bin:$PATH'
source ~.bashrc
version `GLIBC_2.28' not found 报错处理
试了一下ascp
,报错如下:
ascp: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ascp)
ascp: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by ascp)
查看/lib64/libc.so.6
文件
strings /lib64/libc.so.6 | grep GLIBC
显示
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_PRIVATE
果然没有GLIBC_2.28
去下载页面
wget --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz
tar -zvxf glibc-2.28.tar.gz
cd glibc-2.28/
不能安装在同个目录,否则报错:configure: error: you must configure in a separate build directory
mkdir build
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
然后又报错:These critical programs are missing or too old: make compiler
查看make和gcc版本
make -v cat /proc/version
gcc -v cat /proc/version
#查到make是3.82,gcc是4.8.5
去下载网址找新版本
似乎需要root权限不然会报错/usr/bin/install: cannot create regular file ‘/usr/share/info/make.info’: Permission denied
wget --no-check-certificate https://ftp.gnu.org/pub/gnu/make/make-4.3.tar.gz
wget --no-check-certificate https://ftp.gnu.org/pub/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.gz
tar -zvxf make-4.3.tar.gz
tar -zvxf gcc-12.2.0.tar.gz
mkdir temp #作为临时编译目录
cd /usr/local
mkdir make-4.3
cd -
cd temp
../make-4.3/configure --prefix=/usr/local/make-4.3
type make
make check
make install
安装gcc时会依次报错:
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations.
error while loading shared libraries: libisl.so.15: cannot open shared object file: No such file or directory
required isl version is 0.15 or later
libmpfr.so.6: cannot open shared object file: No such file or directory
所以还是去下载最新版
cd ..
wget --no-check-certificate https://ftp.gnu.org/pub/gnu/gmp/gmp-6.2.1.tar.bz2
wget --no-check-certificate https://ftp.gnu.org/pub/gnu/mpfr/mpfr-4.1.0.tar.gz
wget --no-check-certificate https://ftp.gnu.org/pub/gnu/mpc/mpc-1.2.1.tar.gz
wget --no-check-certificate https://libisl.sourceforge.io/isl-0.24.tar.gz
tar -xjf gmp-6.2.1.tar.bz2
tar -xjf isl-0.24.tar.bz2
tar -xzf mpfr-4.1.0.tar.gz
tar -xzf mpc-1.2.1.tar.gz
cd /usr/local
mkdir gmp-6.2.1
mkdir isl-0.24.tar.bz2
mkdir mpfr-4.1.0
mkdir mpc-1.2.1
mkdir gcc-12.2.0
cd -
cd temp
rm -rf *
../gmp-6.2.1/configure --prefix=/usr/local/gmp-6.2.1
make
make install
rm -rf *
../mpfr-4.1.0/configure --prefix=/usr/local/mpfr-4.1.0 --with-gmp=/usr/local/gmp-6.2.1
make
make install
rm -rf *
../mpc-1.2.1/configure --prefix=/usr/local/mpc-1.2.1 --with-gmp=/usr/local/gmp-6.2.1 --with-mpfr=/usr/local/mpfr-4.1.0
make
make install
rm -rf *
#需要写入库位置
vi /etc/ld.so.conf
/usr/local/gmp-6.1.2/lib
/usr/local/mpfr-4.0.2/lib
/usr/local/mpc-1.1.0/lib
ldconfig
../isl-0.24/configure --prefix=/usr/local/isl-0.24
make
make install
rm -rf *
然后看一眼有没有libmpfr.so.6,没有6的话应该有4,建立个软链接
find /usr/ -name libmpfr.so.* #果然没有6
/usr/lib64/libmpfr.so.4 # lib64也可能是更长的名字
ln -s /usr/lib64/libmpfr.so.4 /usr/lib64/libmpfr.so.6
终于可以安装gcc了,都快忘记自己一开始是要干啥hhh
32位--enable-multilib
,64位--disable-multilib
../gcc-12.2.0/configure --prefix=/usr/local/gcc-12.2.0 --with-gmp=/usr/local/gmp-6.2.1 --with-mpfr=/usr/local/mpfr-4.1.0 --with-mpc=/usr/local/mpc-1.2.1 --with-isl=/usr/local/isl-0.24 --disable-multilib
make #需要很久
make install
12.2.0太高级了,重下8.2.0,isl重下0.18,其他遇到的问题上面都讲过了configure: error: cannot compute suffix of object files: cannot compile
然后回到glibc
cd ../glibc-2.28/build
../configure --prefix=/usr/local/glibc-2.28 --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make
make install
报错/path/to/glibc-2.28/build/elf/ldconfig: Warning: ignoring configuration file that cannot be opened: /usr/local/glibc-2.28/etc/ld.so.conf: No such file or directory
复制一个过来就好了
cp /etc/ld.so.conf /usr/local/glibc-2.28/etc/
然后重来一遍,搞定
但是不能用
试图解决问题,但好像进入了危险的领域
cd /usr/lib64
ls -ltr
但是太多了,跟2.28的lib也不全对得上,不敢改
cd /usr/lib64
cp /path/to/glibc-2.28/build/libc.so.6 libc-2.28.so
export LD_PRELOAD=/lib64/libc-2.17.so
unlink libc.so.6
ln -s libc-2.28.so libc.so.6
export LD_PRELOAD=""
报错Segmentation fault
好的,然后我又改回去了
conda一步到位
这时候我开始反思
为什么我花了3天在这里纠缠
而不去试一下conda
conda create -n ascp
conda install -c hcc aspera-cli -y
ascp -h #检查安装
五分钟,解决了
但说是sra数据上传云端后ascp下载也不会快了好像,新版prefetch就不自动用ascp了