Dependencies - ptt/pttbbs GitHub Wiki

安裝相依套件

在設定編譯 pttbbs 之前,依照不同環境安裝所需套件有助於編譯工作能夠順利進行:

Debian / Ubuntu

以下為 pttbbs 在 Debian 的相關相依套件列表,大致亦適用於其他版本(Ubuntu):

bmake
ccache
clang
git
libevent-dev
pkg-config
python
libio-all-perl       #perl
libemail-sender-perl  #perl
  • Debian Bug #823185 指出新版 bmake 指令預設不再提供 bsd.*.mk 規則供使用者利用, 若有需求(編譯本專案程式碼者), 請使用傳統 pmake 指令 (套件維護者已協助將指令導向至 bmake -m /usr/share/bmake/mk-netbsd)

apt 等指令安裝即可

CentOS/Fedora

以下為 pttbbs 在 CentOS Linux 7 的相關相依套件列表,大致亦適用於其他版本或 Fedora:

ccache.x86_64               3.3.4-1.el7            epel    
clang.x86_64                3.4.2-8.el7            epel    
git.x86_64                  1.8.3.1-12.el7_4       updates 
libevent-devel.x86_64       2.0.21-4.el7           base
python.x86_64               2.7.5-58.el7           anaconda

yum/dnf 等指令安裝即可

  • CentOS 沒有提供 bmake 套件,請自行從 https://src.fedoraproject.org/rpms/bmake 去 backport 新版 rpm 套件到現有系統.

  • Fedora 中的 bmake 套件,採用之較新釋出的版本, 並且沒有保留原本的 bsd.*.mk 規則, 可能會有一些尚未確認的編譯問題,若可行建議自行手動到 source 目錄下的 common 執行 bmake allmbbsdutil 下執行 bmake all install,成功後再回到主目錄 bmake clean,或是自行下載舊版的 bsd.*.mk , 利用 bmake -m /path/to/legacy/bsd/mk 來編譯。

Arch Linux

以下為 pttbbs 在 Arch Linux (2018-04-01) 的相關相依套件列表

bmake 20180222-1
clang 6.0.0-1
ccache 3.4.1-1
git 2.17.0-1
libevent 2.1.8-1
python2 2.7.14-2

pacman 等指令安裝即可

  • Arch Linux 中的 bmake 套件,採用之較新釋出的版本, 並且沒有保留原本的 bsd.*.mk 規則, 可能會有一些尚未確認的編譯問題,若可行建議自行手動到 source 目錄下的 common 執行 bmake allmbbsdutil 下執行 bmake all install,成功後再回到主目錄 bmake clean,或是自行下載舊版的 bsd.*.mk , 利用 bmake -m /path/to/legacy/bsd/mk 來編譯。

FreeBSD

以下為 pttbbs 在 FreeBSD 11.x 的相關相依套件列表

ccache-3.3.5                   Tool to minimize the compile time of C/C++ programs
git-2.16.3                     Distributed source code management tool
libevent-2.1.8_1               API for executing callback functions on events or timeouts
python-2.7_3,2                 "meta-port" for the default version of Python interpreter
libiconv-1.14_11               Character set conversion library

使用 pkg 指令安裝相關套件即可 ( make , clang 已包在 FreeBSD 的 base 底下了 )