Software-Installation
嘗試安裝最新版本的 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
為什麼沒有正確安裝?
/home/Documents/Missing
不是來自mawk的來源。也許有一個雜散的環境變數。“make check”應該使用建構樹的 mawk 副本。這是檢查的主要地方。你沒有跑
make
這可能反映了 makefile 中缺少的依賴項。
除此之外 - 預設情況下, configure 使用
/usr/local/bin
,如果在你的PATH
than之後/usr/bin
,你只會看到/usr/bin/mawk
.要為 /usr/bin 配置,請執行
make distclean ./configure --prefix=/usr make make check