gpt4 book ai didi

linux - "executable: command not found"虽然"make executable"成功了

转载 作者:太空宇宙 更新时间:2023-11-04 10:50:50 28 4
gpt4 key购买 nike

我正在尝试安装一个名为 MFOC 的工具.我按照其网站中提到的说明进行操作,如下所示:

ebrahim@ubuntu:~$ cd Desktop/mfoc-master/

ebrahim@ubuntu:~/Desktop/mfoc-master$ sudo automake
[sudo] password for ebrahim:

ebrahim@ubuntu:~/Desktop/mfoc-master$ sudo autoconf

ebrahim@ubuntu:~/Desktop/mfoc-master$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libnfc... yes
checking for inline... inline
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for size_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for memset... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

ebrahim@ubuntu:~/Desktop/mfoc-master$ make
make all-recursive
make[1]: Entering directory `/home/ebrahim/Desktop/mfoc-master'
Making all in src
make[2]: Entering directory `/home/ebrahim/Desktop/mfoc-master/src'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/ebrahim/Desktop/mfoc-master/src'
make[2]: Entering directory `/home/ebrahim/Desktop/mfoc-master'
make[2]: Leaving directory `/home/ebrahim/Desktop/mfoc-master'
make[1]: Leaving directory `/home/ebrahim/Desktop/mfoc-master'

ebrahim@ubuntu:~/Desktop/mfoc-master$ mfoc -h
No command 'mfoc' found, did you mean:
Command 'moc' from package 'qtchooser' (main)
Command 'mdoc' from package 'monodoc-base' (main)
mfoc: command not found
ebrahim@ubuntu:~/Desktop/mfoc-master$

如您所见,make 命令似乎有问题,之后我无法使用该工具。我该如何处理这个问题?

最佳答案

只是普通的 mfoc 会查看您的 PATH 中的目录,它不(也不应该)包含当前目录。

如果您要运行的当前目录中有一个工具,请指定一个路径。当前目录的相对路径只是./.

./mfoc

更一般地说,要在不在 PATH 中的目录中运行工具,请指定该目录的(相对或绝对)路径;

../mfoc-master/mfoc   # look in "mfoc-master" within the parent dir (..)
~/Desktop/mfoc-master/mfoc # relative to home dir (~)
/home/ebrahim/Desktop/mfoc-master/mfoc # absolute path

如果您希望将该工具安装在您的 PATH 中,命令 make install 通常会执行此操作。

关于linux - "executable: command not found"虽然"make executable"成功了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31112353/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com