bash: make: 未找到命令
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了bash: make: 未找到命令相关的知识,希望对你有一定的参考价值。
为什么啊
Admin@startos:~/桌面/reaver-1.4/src$ ./configure
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/Admin/桌面/reaver-1.4/src':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
Admin@startos:~/桌面/reaver-1.4/src$ make
bash: make: 未找到命令
Admin@startos:~/桌面/reaver-1.4/src$
gcc-dev ( 4.4.3 )
glibc-dev ( 2.11.1 )
linux-headers-dev ( 2.6.38.2 )
必备GNU编译工具
make ( 3.81 )
automake ( 1.11.1 )
autoconf ( 2.65 )
m4 (1.4.14)
cmake ( 2.8.1 ,有些项目编译是用cmake的) 参考技术A linux环境下安装:
yum -y install gcc automake autoconf libtool make
安装g++:
yum install gcc gcc-c++ 参考技术B 我的debian,安装编译PYTHON时也是这样报错,直接安装MAKE就解决,sudo apt-get install make或在root下apt-get imstall make,希望对你有帮助
linux--bash: redis-server: 未找到命令
linux 安装redis过程中出现了异常,make不通过,异常如下:
[[email protected] redis-2.8.3]# make
cd src && make all
make[1]: 进入目录“/usr/local/services/redis/redis-2.8.3/src”
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html
(cd ../deps && make distclean)
make[2]: 进入目录“/usr/local/services/redis/redis-2.8.3/deps”
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
make[2]: 离开目录“/usr/local/services/redis/redis-2.8.3/deps”
(rm -f .make-*)
echo STD=-std=c99 -pedantic >> .make-settings
echo WARN=-Wall >> .make-settings
echo OPT=-O2 >> .make-settings
echo MALLOC=jemalloc >> .make-settings
echo CFLAGS= >> .make-settings
echo LDFLAGS= >> .make-settings
echo REDIS_CFLAGS= >> .make-settings
echo REDIS_LDFLAGS= >> .make-settings
echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -Wall -O2 -g -ggdb -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -DUSE_JEMALLOC -I../deps/jemalloc/include >> .make-settings
echo PREV_FINAL_LDFLAGS= -g -ggdb -rdynamic >> .make-settings
(cd ../deps && make hiredis linenoise lua jemalloc)
make[2]: 进入目录“/usr/local/services/redis/redis-2.8.3/deps”
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
(echo "" > .make-cflags)
(echo "" > .make-ldflags)
MAKE hiredis
cd hiredis && make static
make[3]: 进入目录“/usr/local/services/redis/redis-2.8.3/deps/hiredis”
gcc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
make[3]: gcc:命令未找到
make[3]: *** [net.o] 错误 127
make[3]: 离开目录“/usr/local/services/redis/redis-2.8.3/deps/hiredis”
make[2]: *** [hiredis] 错误 2
make[2]: 离开目录“/usr/local/services/redis/redis-2.8.3/deps”
make[1]: [persist-settings] 错误 2 (忽略)
CC adlist.o
/bin/sh: cc: 未找到命令
make[1]: *** [adlist.o] 错误 127
make[1]: 离开目录“/usr/local/services/redis/redis-2.8.3/src”
make: *** [all] 错误 2
提示:gcc 命令未找到
使用命令安装一下就可以解决了:
yum install -y gcc g++ gcc-c++ make
解决了上面问题后,又出现如下问题:
[email protected] redis-2.8.3]# make cd src && make all make[1]: 进入目录“/usr/local/services/redis/redis-2.8.3/src” CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录 #include <jemalloc/jemalloc.h> ^ 编译中断。 make[1]: *** [adlist.o] 错误 1 make[1]: 离开目录“/usr/local/services/redis/redis-2.8.3/src” make: *** [all] 错误 2
继续填坑,解决方案,如下:
[[email protected] redis-2.8.3]# make MALLOC=libc
最后,终于把redis服务启动起来了:
[[email protected] src]# ./redis-server
[4547] 22 Dec 13:28:14.636 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
[4547] 22 Dec 13:28:14.637 * Max number of open files set to 10032
_._
_.-``__ ‘‘-._
_.-`` `. `_. ‘‘-._ Redis 2.8.3 (00000000/0) 64 bit
.-`` .-```. ```/ _.,_ ‘‘-._
( ‘ , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|‘` _.-‘| Port: 6379
| `-._ `._ / _.-‘ | PID: 4547
`-._ `-._ `-./ _.-‘ _.-‘
|`-._`-._ `-.__.-‘ _.-‘_.-‘|
| `-._`-._ _.-‘_.-‘ | http://redis.io
`-._ `-._`-.__.-‘_.-‘ _.-‘
|`-._`-._ `-.__.-‘ _.-‘_.-‘|
| `-._`-._ _.-‘_.-‘ |
`-._ `-._`-.__.-‘_.-‘ _.-‘
`-._ `-.__.-‘ _.-‘
`-._ _.-‘
`-.__.-‘
[4547] 22 Dec 13:28:14.640 # Server started, Redis version 2.8.3
[4547] 22 Dec 13:28:14.640 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1‘ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1‘ for this to take effect.
[4547] 22 Dec 13:28:14.640 * The server is now ready to accept connections on port 6379
以上是关于bash: make: 未找到命令的主要内容,如果未能解决你的问题,请参考以下文章