FreeBSD 安裝 Bash 記錄


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 切到 Bash 的 Ports 裡
cd /usr/ports/shells/bash

# 之後在 Ports 內執行安裝
make install clean

# 最後建立軟鏈接 /bin/bash
ln -s /usr/local/bin/bash /bin/bash

# 過程中可能會出現 Bison 安裝不成功的錯誤
checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.
===> Script "configure" failed unexpectedly.
Please report the problem to [email protected] [maintainer] and attach the
"/usr/ports/devel/bison/work/bison-2.5.1/config.log" including the output of
the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. an `ls
/var/db/pkg`).
*** Error code 1

Stop in /usr/ports/devel/bison.
*** Error code 1

Stop in /usr/ports/shells/bash.

# 因為 GNU M4 版本過低
# 解決方法是先將依賴 M4 的東西先刪除
pkg_delete -f /var/db/pkg/auto\*

# 之後再重新安裝 M4
# 解決這個後再重新回到 Bash 的 Port 安裝就可以了
cd /usr/ports/devel/m4 && make install clean