CentOS 中安裝高版本 nodejs 問題小記

2021-10-09 11:41:37 字數 1972 閱讀 4085

如果你在centos中安裝最新版本nodejs時碰到如下報錯,嘗試按照下面的步驟公升級一下glibc吧

node: /usr/lib64/libstdc++.so.6: version `glibcxx_3.4.14' not found (required by node)

node: /usr/lib64/libstdc++.so.6: version `glibcxx_3.4.18' not found (required by node)

node: /usr/lib64/libstdc++.so.6: version `cxxabi_1.3.5' not found (required by node)

node: /usr/lib64/libstdc++.so.6: version `glibcxx_3.4.15' not found (required by node)

node: /lib64/libc.so.6: version `glibc_2.16' not found (required by node)

node: /lib64/libc.so.6: version `glibc_2.17' not found (required by node)

node: /lib64/libc.so.6: version `glibc_2.14' not found (required by node)

檢查當前glibc庫版本為2.12

# 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_private

wget
編譯

// 編譯時間較長,開啟screen避免編譯中斷

# screen -s glibc

# tar -xf glibc-2.17.tar.gz

# cd glibc-2.17

# mkdir build

# cd build

// 預編譯

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

// 多執行緒編譯,加快編譯速度

# make -j 4

# make install

檢查安裝版本,如果顯示如下內容就說明公升級成功了,去試試node能不能用吧

# 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

centos安裝高版本git

不多說了,開始乾貨了。首先應該安裝好必要的依賴包,省得在安裝過程 現各種問題。yum install curl devel expat devel gettext devel openssl devel zlib devel gcc perl extutils makemakerwget tar x...

Centos安裝php高版本

安裝 1.檢查當前是否有安裝php rpm qa grep php如果有安裝php,那麼請先刪除這些安裝包 yum remove php 2.安裝php源 centos 5 安裝php源 rpm ivhcentos 6 安裝php源 rpm ivhcentos 7 安裝php源和epel擴充套件源 ...

Centos安裝php高版本

安裝 1.檢查當前是否有安裝php rpm qa grep php如果有安裝php,那麼請先刪除這些安裝包 yum remove php 2.安裝php源 centos 5 安裝php源 rpm ivhcentos 6 安裝php源 rpm ivhcentos 7 安裝php源和epel擴充套件源 ...