香港/韩国云服务器、独立服务器租用

AlmaLinux安装screen曲折过程

自营机房/高防服务器/高防VPS/美国高防/洛杉矶VPS/洛杉矶高防服务器

最近入了一家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

screen-almalinux

上网找了下,装上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,我没有做这一步已经正常使用命令了。发觉我这个VPS主机商系统模板精简比较厉害,wget、tar、make这些都没有,不过这些直接yum install就OK了。

码字不易,谢绝复制粘贴:赵容部落 » AlmaLinux安装screen曲折过程
便宜VPS/10美元VPS/洛杉矶、圣何塞等多个机房