Linux裝逼代碼雨


一、下載源碼包
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 [顏色]:將此顏色用於矩陣(默認為綠色
————————————————
版權聲明:本文為CSDN博主「友人a筆記」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/tladagio/article/details/101283549


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM