尝试安装最新版本的 mawk 时出错

尝试安装最新版本的 mawk 时出错

我的计算机上目前安装了 mawk 1.3.3。我尝试从以下位置安装最新版本的 mawk (1.3.4):

https://invisible-island.net/mawk/#download

我下载了源文件,将源文件从 mawk.tar.gz 提取到一个文件夹中,然后 cd 到包含源文件的文件夹中。然后我在终端中输入以下内容:

./configure
make check
sudo make install

./configure似乎运行良好,但make check给了我这个:

** mawk_test
./mawktest: 91: ./mawktest: /home/Documents/Missing: not found

testing input and field splitting
./mawktest: 97: ./mawktest: /home/Documents/Missing: not found
?? fail wc.awk
./mawktest: 98: ./mawktest: /home/Documents/Missing: not found
?? fail null-rs.awk
./mawktest: 100: ./mawktest: /home/Documents/Missing: not found
./mawktest: 101: ./mawktest: /home/Documents/Missing: not found
./mawktest: 103: ./mawktest: /home/Documents/Missing: not found
./mawktest: 104: ./mawktest: /home/Documents/Missing: not found
./mawktest: 106: ./mawktest: /home/Documents/Missing: not found
./mawktest: 107: ./mawktest: /home/Documents/Missing: not found
./mawktest: 109: ./mawktest: /home/Documents/Missing: not found
./mawktest: 110: ./mawktest: /home/Documents/Missing: not found
./mawktest: 113: ./mawktest: /home/Documents/Missing: not found
./mawktest: 114: ./mawktest: /home/Documents/Missing: not found
./mawktest: 116: ./mawktest: /home/Documents/Missing: not found
./mawktest: 117: ./mawktest: /home/Documents/Missing: not found
?? fail case 8
./mawktest: 122: ./mawktest: /home/Documents/Missing: not found
./mawktest: 123: ./mawktest: /home/Documents/Missing: not found
./mawktest: 125: ./mawktest: /home/Documents/Missing: not found
./mawktest: 126: ./mawktest: /home/Documents/Missing: not found
input and field splitting had 3 failures

testing regular expression matching
./mawktest: 145: ./mawktest: /home/Documents/Missing: not found
./mawktest: 146: ./mawktest: /home/Documents/Missing: not found
./mawktest: 147: ./mawktest: /home/Documents/Missing: not found
./mawktest: 148: ./mawktest: /home/Documents/Missing: not found
./mawktest: 149: ./mawktest: /home/Documents/Missing: not found
./mawktest: 150: ./mawktest: /home/Documents/Missing: not found
./mawktest: 151: ./mawktest: /home/Documents/Missing: not found
./mawktest: 152: ./mawktest: /home/Documents/Missing: not found
?? fail reg0-reg7 case
./mawktest: 157: ./mawktest: /home/Documents/Missing: not found
?? fail noloop2 test
./mawktest: 159: ./mawktest: /home/Documents/Missing: not found
?? fail noloop1 test
./mawktest: 161: ./mawktest: /home/Documents/Missing: not found
?? fail case 1
./mawktest: 164: ./mawktest: /home/Documents/Missing: not found
./mawktest: 165: ./mawktest: /home/Documents/Missing: not found
./mawktest: 167: ./mawktest: /home/Documents/Missing: not found
./mawktest: 168: ./mawktest: /home/Documents/Missing: not found
./mawktest: 170: ./mawktest: /home/Documents/Missing: not found
./mawktest: 171: ./mawktest: /home/Documents/Missing: not found
./mawktest: 173: ./mawktest: /home/Documents/Missing: not found
./mawktest: 174: ./mawktest: /home/Documents/Missing: not found
?? fail case 6
regular expression matching had 5 failures

testing checking for write errors
checking for write errors OK

testing arrays and flow of control
./mawktest: 199: ./mawktest: /home/Documents/Missing: not found
?? fail 
array test had one failure

testing nextfile
./mawktest: 207: ./mawktest: /home/Documents/Missing: not found
?? fail 
nextfile test had one failure

testing function calls and general stress test
./mawktest: 215: ./mawktest: /home/Documents/Missing: not found
?? fail 
general stress test had one failure
tested /home/Documents/Missing Semester/mawk-1.3.4-20200120/mawk had 11 failures
make: *** [Makefile:107: mawk_test] Error 11

然后sudo make install给我以下输出:

/usr/bin/install -c mawk /usr/local/bin/`echo mawk|    sed 's,x,x,'`
/usr/bin/install -c -m 644 ./man/mawk.1 /usr/local/share/man/man1/`echo mawk|    sed 's,x,x,'`.1

它似乎没有正确安装,因为当我通过 检查 mawk 的版本时 awk -W version,我得到:

mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

compiled limits:
max NF             32767
sprintf buffer      2040

为什么安装不正确?

答案1

这些/home/Documents/Missing不是来自 mawk 来源。也许有一个杂散的环境变量。

“make check”应该使用构建树的 mawk 副本。这是主要检查的地方。你没有跑

make

这可能反映了 makefile 中缺少依赖项。

除此之外 - 默认情况下,configure 使用/usr/local/bin,如果它在你的PATHthen后面/usr/bin,你只会看到/usr/bin/mawk.

要配置 /usr/bin,请执行以下操作

make distclean
./configure --prefix=/usr
make
make check

除此之外,它超出了 StackExchange 的范围,也许是错误报告。更详细信息将需要。

相关内容