1. 程式人生 > 實用技巧 >CentOS 7.3 安裝 Redis 報錯“You need tcl 8.5 or newer in order to run the Redis test”

CentOS 7.3 安裝 Redis 報錯“You need tcl 8.5 or newer in order to run the Redis test”

CentOS 7.3 安裝 Redis 報錯“You need tcl 8.5 or newer in order to run the Redis test”


問題說明

個人安裝的是 redis-5.0.4,在解壓目錄下執行完 make 命令後,在 src/ 目錄下執行 make test命令的時候報錯,資訊如下:

You need tcl 8.5 or newer in order to run the Redis test

問題原因

按照錯誤資訊的提示可知:系統中缺少 tcl 或者 tcl 版本比較老

解決方案

1、檢查系統中是否有 tcl發現系統中沒有安裝tcl

rpm -qa | grep
tcl

2、下載並安裝tcl

1)下載tcl-8.5.13-8.el7.x86_64.rpm

wget http://mirror.centos.org/centos/7/os/x86_64/Packages/tcl-8.5.13-8.el7.x86_64.rpm

2)安裝tcl-8.5.13-8.el7.x86_64.rpm

rpm -ivh tcl-8.5.13-8.el7.x86_64.rpm

如果在下載的時候,wget 命令執行報錯,提示沒有安裝 wget,可以通過以下命令先安裝 wget

yum install -y wget

3)安裝 tcl 後,再次執行 make test
命令

出現以下提示資訊,表示 Redis test 成功

All tests passed without errors!

3、驗證

1)後臺啟動 redis-server 伺服器端

nohup src/redis-server &

2)啟動 redis-cli 客戶端

src/redis-cli

由上圖中的getset命令的執行結果可以看出:Redis可以正常操作,順利完成安裝!