Centos7编译安装cmatrix(模拟电影黑客代码雨界面)

一、下载源码包

https://zh.osdn.net/projects/sfnet_cmatrix/downloads/cmatrix/1.2a/cmatrix-1.2a.tar.gz/

二、安装

1、首先安装编译需要的gcc

[root@localhost ~]# yum install -y gcc

2、解压

[root@localhost ~]# tar  -zxvf cmatrix-1.2a.tar.gz

3、配置

[root@localhost ~]# cd cmatrix-1.2a
[root@localhost cmatrix-1.2a]# ./configure --prefix=/apps/cmatrix

4、编译make

[root@localhost cmatrix-1.2a]# make
gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -Wall -Wno-comment -c cmatrix.c
cmatrix.c:37:20: fatal error: curses.h: No such file or directory
 #include <curses.h>
                    ^
compilation terminated.
make: *** [cmatrix.o] Error 1

查询缺少的包

[root@localhost cmatrix-1.2a]# yum list *curses*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: ftp.sjtu.edu.cn
Installed Packages
ncurses.x86_64                                                                              5.9-14.20130511.el7_4                                                                   @anaconda
ncurses-base.noarch                                                                         5.9-14.20130511.el7_4                                                                   @anaconda
ncurses-libs.x86_64                                                                         5.9-14.20130511.el7_4                                                                   @anaconda
Available Packages
ncurses-devel.i686                                                                          5.9-14.20130511.el7_4                                                                   base     
ncurses-devel.x86_64                                                                        5.9-14.20130511.el7_4                                                                   base     
ncurses-libs.i686                                                                           5.9-14.20130511.el7_4                                                                   base     
ncurses-static.i686                                                                         5.9-14.20130511.el7_4                                                                   base     
ncurses-static.x86_64                                                                       5.9-14.20130511.el7_4                                                                   base     
ncurses-term.noarch                                                                         5.9-14.20130511.el7_4                                                                   base     
ocaml-curses.x86_64                                                                         1.0.3-20.el7                                                                            base     
ocaml-curses-devel.x86_64                                                                   1.0.3-20.el7                                                                            base

安装

[root@localhost cmatrix-1.2a]# yum install -y ncurses-devel

再次编译还是会提示错误,但是需要的包已经安装了。可以删除目录,重新解压之后再次执行上面操作

[root@localhost cmatrix-1.2a]# make
...
...
collect2: error: ld returned 1 exit status
make: *** [cmatrix] Error 1

[root@localhost ~]# rm -rf cmatrix-1.2a
[root@localhost ~]# tar  -zxvf cmatrix-1.2a.tar.gz
[root@localhost ~]# cd cmatrix-1.2a

5、编译make install

[root@localhost cmatrix-1.2a]# make install
make[1]: Entering directory `/root/cmatrix-1.2a'
/bin/sh ./mkinstalldirs /apps/cmatrix/bin
mkdir /apps
mkdir /apps/cmatrix
mkdir /apps/cmatrix/bin
  /usr/bin/install -c  cmatrix /apps/cmatrix/bin/cmatrix
make  install-man1
make[2]: Entering directory `/root/cmatrix-1.2a'
/bin/sh ./mkinstalldirs /apps/cmatrix/man/man1
mkdir /apps/cmatrix/man
mkdir /apps/cmatrix/man/man1
 /usr/bin/install -c -m 644 ./cmatrix.1 /apps/cmatrix/man/man1/cmatrix.1
make[2]: Leaving directory `/root/cmatrix-1.2a'
 Installing matrix fonts in /usr/lib/kbd/consolefonts...
make[1]: Leaving directory `/root/cmatrix-1.2a'

6、查看效果

[root@localhost cmatrix-1.2a]# cd /apps/cmatrix/bin/
[root@localhost bin]# ./cmatrix 

相关参数:

-a:异步滚动
-b:启用粗体字符
-b:所有粗体字符(覆盖-b)
-f:强制启用linux$term类型
-l:linux模式(使用矩阵控制台字体)
-o:使用旧式滚动
-h:打印使用和退出
-n:无粗体字符(覆盖-b和-b,默认)
-s:“屏幕保护程序”模式,在第一次按键时退出
-x:窗口模式,如果您的xterm使用mtx.pcf,则使用
-v:打印版本信息并退出
-u延迟(0-10,默认4):屏幕更新延迟
-C [颜色]:将此颜色用于矩阵(默认为绿色)

  • 2
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

友人a笔记

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值