新聞中心
解決Redis編譯安裝報(bào)錯(cuò)問(wèn)題

Redis是一款高性能鍵值對(duì)存儲(chǔ)系統(tǒng),它可以用來(lái)作為緩存、消息隊(duì)列、數(shù)據(jù)存儲(chǔ)等用途。在進(jìn)行Redis的安裝時(shí),有時(shí)會(huì)出現(xiàn)各種報(bào)錯(cuò)問(wèn)題。本篇文章將介紹如何解決Redis編譯安裝報(bào)錯(cuò)問(wèn)題。
問(wèn)題1:MAKE: *** No targets specified and no makefile found. 命令
當(dāng)我們執(zhí)行make命令時(shí),可能會(huì)出現(xiàn)以下錯(cuò)誤提示:
make: *** No targets specified and no makefile found. Stop.
這種情況一般是由于我們沒(méi)有執(zhí)行 ./configure 命令導(dǎo)致的。執(zhí)行以下命令即可解決:
./configure
make
sudo make install
問(wèn)題2:cc1: error: unrecognized command line option “-std=c99”
在執(zhí)行make命令時(shí),可能會(huì)出現(xiàn)以下錯(cuò)誤提示:
cc1: error: unrecognized command line option "-std=c99"
這種情況一般是由于gcc的版本過(guò)低導(dǎo)致的。我們需要升級(jí)gcc版本到4.7或以上。執(zhí)行以下命令即可升級(jí)gcc:
sudo add-apt-repository ppa:ubuntu-toolchn-r/test
sudo apt-get update
sudo apt-get install gcc-4.7
sudo apt-get upgrade
然后在執(zhí)行configure命令時(shí),指定gcc-4.7即可:
./configure CC=gcc-4.7
make
sudo make install
問(wèn)題3:fatal error: jemalloc/jemalloc.h: No such file or directory
在執(zhí)行make命令時(shí),可能會(huì)出現(xiàn)以下錯(cuò)誤提示:
In file included from adlist.c:34:0:
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
這種情況一般是由于沒(méi)有安裝jemalloc庫(kù)導(dǎo)致的。執(zhí)行以下命令即可安裝jemalloc庫(kù):
sudo apt-get install libjemalloc-dev
然后重新執(zhí)行make命令即可:
make
sudo make install
問(wèn)題4:configure: error: jemalloc requested but not found
在執(zhí)行configure命令時(shí),可能會(huì)出現(xiàn)以下錯(cuò)誤提示:
configure: error: jemalloc requested but not found.
這種情況一般是由于沒(méi)有在configure命令中指定jemalloc庫(kù)路徑導(dǎo)致的。執(zhí)行以下命令即可解決:
./configure --with-jemalloc=
make
sudo make install
其中,為jemalloc庫(kù)的安裝路徑。
總結(jié)
本篇文章介紹了解決Redis編譯安裝報(bào)錯(cuò)問(wèn)題的方法,包括:
1.執(zhí)行./configure命令;
2.升級(jí)gcc版本;
3.安裝jemalloc庫(kù);
4.指定jemalloc庫(kù)路徑。
通過(guò)以上方法,我們可以解決Redis編譯安裝時(shí)可能出現(xiàn)的各種報(bào)錯(cuò)問(wèn)題,使得Redis能夠正常運(yùn)行。
創(chuàng)新互聯(lián)【028-86922220】值得信賴的成都網(wǎng)站建設(shè)公司。多年持續(xù)為眾多企業(yè)提供成都網(wǎng)站建設(shè),成都品牌網(wǎng)站設(shè)計(jì),成都高端網(wǎng)站制作開(kāi)發(fā),SEO優(yōu)化排名推廣服務(wù),全網(wǎng)營(yíng)銷讓企業(yè)網(wǎng)站產(chǎn)生價(jià)值。
網(wǎng)站標(biāo)題:解決Redis編譯安裝報(bào)錯(cuò)問(wèn)題(redis編譯安裝出錯(cuò))
文章源于:http://m.fisionsoft.com.cn/article/djsojih.html


咨詢
建站咨詢
