Try   HackMD

Taiwan server update history(before 20220105)

Change RHEL yum library repositories

問題

已註冊的RHEL server,但目前非訂閱狀態

嘗試歷程

更換yum library repositories路徑
參照網址

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm sudo yum install ./epel-release-latest-*.noarch.rpm

跳出錯誤訊息:

ERROR You need to update rpm to handle:
rpmlib(PayloadIsZstd) <= 5.4.18-1 is needed by epel-release-9-2.el9.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by epel-release-9-2.el9.noarch
RPM needs to be updated

嘗試更新RPM

wget https://ftp.osuosl.org/pub/rpm/releases/rpm-4.17.x/rpm-4.17.0.tar.bz2 tar jxvf rpm-4.17.0.tar.bz2 cd rpm-4.17.0 mkdir Build cd Build ../configure

跳出錯誤訊息:

configure: error: missing required header archive.h

嘗試更新libarchive

wget https://www.libarchive.org/downloads/libarchive-3.5.2.tar.gz tar -zxvf libarchive-3.5.2.tar.gz -C ../ cd ../libarchive-3.5.2 mkdir Build cd Build ../configure make -j 4 && sudo make install -j 4

再次嘗試更新RPM

cd /home/share/pkg/rpm-4.17.0/Build ../configure

跳出錯誤訊息:

configure: error: --enable-sqlite specified, but not available

嘗試安裝SQlite

cd /home/share/pkg/source/ wget https://www.sqlite.org/2021/sqlite-autoconf-3370000.tar.gz tar -zxvf sqlite-autoconf-3370000.tar.gz -C ../ cd ../sqlite-autoconf-3370000/ mkdir Build && cd Build ../configure

再次嘗試更新RPM

cd /home/share/pkg/rpm-4.17.0/Build ../configure

跳出錯誤訊息:

configure: error: --enable-sqlite specified, but not available

由於SQlite安裝成功,仍然跳出錯誤
嘗試跳過SQlite

../configure --disable-sqlite

跳出錯誤訊息:

configure: error: lua not present or too old)

測試後得知lua有存在,推測為版本過舊
嘗試安裝lua

wget https://www.lua.org/ftp/lua-5.4.3.tar.gz --no-check-certificate
tar -zxvf lua-5.4.3.tar.gz -C ../
cd ../lua-5.4.3
mkdir Build
cd Build
make -j 4 && make install -j 4

成功安裝lua但是沒有更新到原生的lua
嘗試下載rpm包,使用local方式安裝

wget http://rpmfind.net/linux/mageia/distrib/cauldron/x86_64/media/core/release/lua-5.4.3-6.mga9.x86_64.rpm sudo yum localinstall ./lua-5.4.3-6.mga9.x86_64.rpm

節錄錯誤訊息:

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

更新的路上太多關卡

還是裝CentOS好了 :laughing:

Install python3

問題

yum search python3

取得最新版本為3.6

yum install python36

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

跳出訊息

This system is registered with an entitlement server, but is not receiving updates.
You can use subscription-manager to assign subscriptions.

意即此為已註冊的RHEL server,但目前非訂閱狀態

解法

cd /home/share/pkg/source/ #下載python3.10 wget https://www.python.org/ftp/python/3.10.1/Python-3.10.1.tgz tar -zxvf Python-3.10.1.tgz mv ./Python-3.10.1 /home/share/pkg/ cd /home/share/pkg/Python-3.10.1 mkdir Build cd Build ../configure make -j4 && make install -j4 #編譯完成 #加入環境變數 vi ~/.bash_profile 增加一行PATH=$PATH:/home/share/pkg/Python-3.10.1/Build 在export PATH之前

20220105重灌後

tags: Server