在 Debian 上装 cmatrix 失败,常见原因和对应解决办法如下:
apt 源里没有启用对应仓库cmatrix 在 Debian 的 main 仓库中一般是有的,但如果你用的是最小化系统 / 云镜像,可能源被裁剪过。
sudo apt update
apt-cache search cmatrix
如果没有结果:
sudo nano /etc/apt/sources.list
确保有类似:
deb http://deb.debian.org/debian bookworm main
然后:
sudo apt update
正确包名就是:
sudo apt install cmatrix
不是 c-matrix、cmatrix-cli 等。
如果报错类似:
Failed to fetchConnection timed out解决:
ping deb.debian.org
或配置代理:
export http_proxy=http://IP:PORT
export https_proxy=http://IP:PORT
查看版本:
cat /etc/os-release
如果是:
make && make install
失败,常见缺少依赖:
sudo apt install build-essential libncurses5-dev
cmatrix: command not found
其实装成功了,但不在 PATH:
which cmatrix
/usr/games/cmatrix
可以:
export PATH=$PATH:/usr/games
把下面命令的输出发出来,我能精准判断:
sudo apt install cmatrix
或
apt-get install cmatrix
你用的是 Debian 几?物理机 / 虚拟机 / WSL?