searchusermenu
  • 发布文章
  • 消息中心
点赞
收藏
评论
分享
原创

Centos7.9系统下安装Gitbook步骤

2024-09-23 09:43:05
48
0

#下载nvm包管理器,安装npm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash


#nvm包管理器下载npm20

nvm install 20


#npm下载gitbook

npm install gitbook -g


#查看gcc版本

gcc -v


#确认npm依赖组件版本

strings /lib64/libc.so.6 |grep GLIBC_



#手动下载组件

wget http://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz

tar xf glibc-2.28.tar.gz

cd glibc-2.28/ && mkdir build && cd build

cd /usr/local/src


wget http://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

tar -jxvf gcc-5.2.0.tar.bz2

cd gcc-5.2.0

#编辑文件

vim ./contrib/download_prerequisites

** GRAPHITE_LOOP_OPT=yes**


** # Necessary to build GCC.**

** MPFR=mpfr-2.4.2**

** GMP=gmp-4.3.2**

** MPC=mpc-0.8.1**


** #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPFR.tar.bz2 || exit 1**

** wget https://ftp.gnu.org/gnu/mpfr/$MPFR.tar.bz2 --no-check-certificate || exit 1**

** tar xjf $MPFR.tar.bz2 || exit 1**

** ln -sf $MPFR mpfr || exit 1**


** #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$GMP.tar.bz2 || exit 1**

** wget https://gcc.gnu.org/pub/gcc/infrastructure/$GMP.tar.bz2 --no-check-certificate || exit 1**

** tar xjf $GMP.tar.bz2 || exit 1**

** ln -sf $GMP gmp || exit 1**


** #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPC.tar.gz || exit 1**

** wget https://gcc.gnu.org/pub/gcc/infrastructure/$MPC.tar.gz --no-check-certificate || exit 1**

** tar xzf $MPC.tar.gz || exit 1**

** ln -sf $MPC mpc || exit 1**


** # Necessary to build GCC with the Graphite loop optimizations.**

** if [ "$GRAPHITE_LOOP_OPT" = "yes" ] ; then**

** ISL=isl-0.14**


** #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$ISL.tar.bz2 || exit 1**

** wget https://gcc.gnu.org/pub/gcc/infrastructure/$ISL.tar.bz2 --no-check-certificate || exit 1**

** tar xjf $ISL.tar.bz2 || exit 1**

** ln -sf $ISL isl || exit 1**

** fi**


cd /usr/local/src/gcc-5.2.0

#执行文件

./contrib/download_prerequisites

mkdir build

cd build/

**../configure --prefix=/usr/local/gcc --enable-checking=release --enable-languages=c,c++ --disable-multilib**

make && make install


#删除旧的,更新新的软链接

mv /usr/bin/gcc /usr/bin/gcc_4.8.5

ln -s /usr/local/gcc/bin/gcc /usr/bin/gcc

mv /usr/bin/g++ /usr/bin/g++_4.8.5

ln -s /usr/local/gcc/bin/g++ /usr/bin/g++

/usr/bin/g++ --version

npm -v


#更新make

cd /usr/local/src

wget --no-check-certificate https://ftp.gnu.org/gnu/make/make-4.3.tar.gz

tar -zxvf make-4.3.tar.gz

cd make-4.3

./configure --prefix=/usr/local/make

make && make install

cd /usr/bin/

mv make make.bak

ln -sv /usr/local/make/bin/make /usr/bin/make


#更新glibc

cd /usr/local/src/

wget --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz

mv glibc-2.28.tar.gz /usr/local/src

tar -zxvf glibc-2.28.tar.gz

cd glibc-2.28

mkdir build && cd build

../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

make && make install


#定位最新的libstdc++.so文件

find / -name libstdc++.so*

strings /usr/local/gcc/lib64/libstdc++.so.6 |grep GLIBC

cp /usr/local/gcc/lib64/libstdc++.so.6 /usr/lib64

mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bak

cp /usr/local/gcc/lib64/libstdc++.so.6 /usr/lib64

#最后验证

npm -v



theme.js无法跳转-修改为

if(m)for(n.handler&&

if(false)for(n.handler&&

0条评论
0 / 1000
S4nM1
3文章数
0粉丝数
S4nM1
3 文章 | 0 粉丝
原创

Centos7.9系统下安装Gitbook步骤

2024-09-23 09:43:05
48
0

#下载nvm包管理器,安装npm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash


#nvm包管理器下载npm20

nvm install 20


#npm下载gitbook

npm install gitbook -g


#查看gcc版本

gcc -v


#确认npm依赖组件版本

strings /lib64/libc.so.6 |grep GLIBC_



#手动下载组件

wget http://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz

tar xf glibc-2.28.tar.gz

cd glibc-2.28/ && mkdir build && cd build

cd /usr/local/src


wget http://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

tar -jxvf gcc-5.2.0.tar.bz2

cd gcc-5.2.0

#编辑文件

vim ./contrib/download_prerequisites

** GRAPHITE_LOOP_OPT=yes**


** # Necessary to build GCC.**

** MPFR=mpfr-2.4.2**

** GMP=gmp-4.3.2**

** MPC=mpc-0.8.1**


** #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPFR.tar.bz2 || exit 1**

** wget https://ftp.gnu.org/gnu/mpfr/$MPFR.tar.bz2 --no-check-certificate || exit 1**

** tar xjf $MPFR.tar.bz2 || exit 1**

** ln -sf $MPFR mpfr || exit 1**


** #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$GMP.tar.bz2 || exit 1**

** wget https://gcc.gnu.org/pub/gcc/infrastructure/$GMP.tar.bz2 --no-check-certificate || exit 1**

** tar xjf $GMP.tar.bz2 || exit 1**

** ln -sf $GMP gmp || exit 1**


** #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPC.tar.gz || exit 1**

** wget https://gcc.gnu.org/pub/gcc/infrastructure/$MPC.tar.gz --no-check-certificate || exit 1**

** tar xzf $MPC.tar.gz || exit 1**

** ln -sf $MPC mpc || exit 1**


** # Necessary to build GCC with the Graphite loop optimizations.**

** if [ "$GRAPHITE_LOOP_OPT" = "yes" ] ; then**

** ISL=isl-0.14**


** #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$ISL.tar.bz2 || exit 1**

** wget https://gcc.gnu.org/pub/gcc/infrastructure/$ISL.tar.bz2 --no-check-certificate || exit 1**

** tar xjf $ISL.tar.bz2 || exit 1**

** ln -sf $ISL isl || exit 1**

** fi**


cd /usr/local/src/gcc-5.2.0

#执行文件

./contrib/download_prerequisites

mkdir build

cd build/

**../configure --prefix=/usr/local/gcc --enable-checking=release --enable-languages=c,c++ --disable-multilib**

make && make install


#删除旧的,更新新的软链接

mv /usr/bin/gcc /usr/bin/gcc_4.8.5

ln -s /usr/local/gcc/bin/gcc /usr/bin/gcc

mv /usr/bin/g++ /usr/bin/g++_4.8.5

ln -s /usr/local/gcc/bin/g++ /usr/bin/g++

/usr/bin/g++ --version

npm -v


#更新make

cd /usr/local/src

wget --no-check-certificate https://ftp.gnu.org/gnu/make/make-4.3.tar.gz

tar -zxvf make-4.3.tar.gz

cd make-4.3

./configure --prefix=/usr/local/make

make && make install

cd /usr/bin/

mv make make.bak

ln -sv /usr/local/make/bin/make /usr/bin/make


#更新glibc

cd /usr/local/src/

wget --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz

mv glibc-2.28.tar.gz /usr/local/src

tar -zxvf glibc-2.28.tar.gz

cd glibc-2.28

mkdir build && cd build

../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

make && make install


#定位最新的libstdc++.so文件

find / -name libstdc++.so*

strings /usr/local/gcc/lib64/libstdc++.so.6 |grep GLIBC

cp /usr/local/gcc/lib64/libstdc++.so.6 /usr/lib64

mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bak

cp /usr/local/gcc/lib64/libstdc++.so.6 /usr/lib64

#最后验证

npm -v



theme.js无法跳转-修改为

if(m)for(n.handler&&

if(false)for(n.handler&&

文章来自个人专栏
云服务器相关
2 文章 | 1 订阅
0条评论
0 / 1000
请输入你的评论
0
0