Redis-3.0.7_ubuntu下編譯

背景

回到家,本想接着看源碼,但沒有debug環境,突然想起自己原先將一塊機械硬盤作成了ubuntu14.10,遂下載了redis3.0.7的源碼,準備編譯,然後倒入eclipse中進行DEBUG調試,但在編譯的過程中,出現如下錯誤信息。

liblua.a(loslib.o): In function `os_tmpname':
loslib.c:(.text+0x28b): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL    -c -o luac.o luac.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL    -c -o print.o print.c
cc -o luac  luac.o print.o liblua.a -lm 
make[3]: Leaving directory '/media/lijp/學習/DataBase/redis-3.0.7/deps/lua/src'
MAKE jemalloc
cd jemalloc && ./configure --with-jemalloc-prefix=je_ --enable-cc-silence CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops " LDFLAGS=""
/bin/sh: 1: ./configure: Permission denied
Makefile:79: recipe for target 'jemalloc' failed
make[2]: *** [jemalloc] Error 126
make[2]: Leaving directory '/media/lijp/學習/DataBase/redis-3.0.7/deps'
Makefile:142: recipe for target 'persist-settings' failed
make[1]: [persist-settings] Error 2 (ignored)
    CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
 #include <jemalloc/jemalloc.h>
                               ^
compilation terminated.
Makefile:197: recipe for target 'adlist.o' failed
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory '/media/lijp/學習/DataBase/redis-3.0.7/src'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2

最後根據提示信息發現, mkreleasehdr.sh 沒有可執行權限,遂使用chmod命令。

但新的問題出現了,chmod命令沒有起作用,初步調查的原因是:我的ubuntu系統時掛在在widnows下的,無論是root用戶下還是使用sudo,都沒有作用。在網上找到了一些帖子怎麼去賦權限,但沒有親自去嘗試。作爲一個AI以後再解決。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章