大部分 linux 系統都默認安裝了 screen 命令,先查看下否則有這個工具。如果運行 screen 后如上圖一樣提示 command not found,那么說明這個工具還沒有安裝。但是最近開了一臺VPS竟然沒有CentOS系統,聽說AlmaLinux與centos差不多的,所以就想著試試看,結果發現裝個screen就遇到各種麻煩,所以記錄下來,方便下次自己查找。
這里安裝的是AlmaLinux 8,直接yum安裝screen就報錯了
[root@zrblog ~]# yum install screen AlmaLinux 8 - BaseOS??????????????????????????? 896 kB/s |? 11 MB???? 00:12 AlmaLinux 8 - AppStream????????????????????????? 15 MB/s |? 15 MB???? 00:01 AlmaLinux 8 - Extras???????????????????????????? 23 kB/s |? 13 kB???? 00:00 No match for argument: screen Error: Unable to find a match: screen
既然源碼包不存在,就直接去下載源碼來安裝,官網 http://ftp.gnu.org/gnu/screen
這里以4.9.1為例,為什么不是最新的5.0.0呢?因為試了幾次沒裝上:
[root@zrblog ~]# wget http://ftp.gnu.org/gnu/screen/screen-4.9.1.tar.gz [root@zrblog ~]# tar -xvf screen-4.9.1.tar.gz [root@zrblog ~]# cd screen-4.9.1 [root@zrblog screen-4.9.1]# ./configure this is screen version 4.9.1 checking for prefix by checking for screen... no checking for prefix by checking for gzip... /usr/bin/gzip checking for gcc... no checking for cc... no checking for cl.exe... no checking for clang... no configure: error: in `/root/screen-4.9.1': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details
./configure又報錯了:configure: error: no acceptable C compiler found in $PATH,裝gcc
yum -y install gcc
完了再試試./configure,還是報錯,只是信息變了
[root@zrblog screen-4.9.1]# ./configure
上網找了下,裝上ncurses-devel就好了
yum -y install ncurses-devel
之后再./configure,終于不報錯了,完成后再繼續執行
[root@zrblog screen-4.9.1]#make && make install termcap entry (./terminfo/screencap) should be installed manually. You may also want to install ./etc/etcscreenrc in /usr/etc/screenrc [root@zrblog screen-4.9.1]#install -m 644 etc/etcscreenrc /etc/screenrc
完成后screen就可以使用了,看有的地方提醒還要:cp ./screen /bin,小編沒有做這一步已經正常使用命令了。
溫馨提醒 如果您有選擇困難癥,直接選中間的 CN2 GIA-E方案,季付 $49.99,多達 12 個機房任意切換
| 方案 | 內存 | CPU | 硬盤 | 流量/月 | 帶寬 | 機房 | 價格 | 購買 |
|---|---|---|---|---|---|---|---|---|
| CN2 (最便宜) |
1GB | 1核 | 20GB | 1TB | 1Gbps | DC3 CN2 DC8 ZNET |
$49.99/年 | 直達 |
| CN2 | 2GB | 1核 | 40GB | 2TB | 1Gbps | $52.99/半年 $99.99/年 |
直達 | |
| CN2 GIA-E (最推薦) |
1GB | 2核 | 20GB | 1TB | 2.5Gbps | DC6 CN2 GIA-E DC9 CN2 GIA 日本軟銀 JPOS_1 荷蘭 EUNL_9 |
$49.99/季度 $169.99/年 |
直達 |
| CN2 GIA-E | 2GB | 3核 | 40GB | 2TB | 2.5Gbps | $89.99/季度 $299.99/年 |
直達 | |
| HK | 2GB | 2核 | 40GB | 0.5TB | 1Gbps | 中國香港 CN2 GIA | $89.99/月 $899.99/年 |
直達 |
| HK | 4GB | 4核 | 80GB | 1TB | 1Gbps | $155.99/月 $1559.99/年 |
直達 | |
| TOKYO | 2GB | 2核 | 40GB | 0.5TB | 1.2Gbps | 日本東京 CN2 GIA | $89.99/月 $899.99/年 |
直達 |
| TOKYO | 4GB | 4核 | 80GB | 1TB | 1.2Gbps | $155.99/月 $1559.99/年 |
直達 | |
| 搬瓦工優惠碼:BWHCGLUKKB | 2024年最新搬瓦工VPS購買圖文教程 | |||||||











![搬瓦工:荷蘭[EUNL_2]機房測評,含速度/丟包/延遲/線路/流媒體解鎖等,年付$49.99起-國外主機測評](http://www.lrracing.com/wp-content/uploads/2026/08/20260807233641.png)









