NJU PA0

NJU PA0

使用教程提供的源再进行sudo apt install ... 可能会出现 Unmet dependencies 此类报错

可以安装 aptitude

shell 复制代码
sudo apt install aptitude
sudo aptitude install <package>

然后它会提示你,选 n 进行降级。再选 Y 确认

或者

将 /etc/apt/sources.list 下的源改为

复制代码
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

再输入

shell 复制代码
sudo apt-get update
sudo apt-get upgrade

对于 git,克隆 ssh 仓库

可能会遇到 ssh: connect to host github.com port 22: Connection refused 这样的报错

解决方案是在 ~/.ssh/config

如果没有则 touch ~/.ssh/config

vim ~/.ssh/config

在其中添加这几行:

shell 复制代码
Host github.com
  Hostname ssh.github.com
  Port 443

然后再进行 git clone

当我们运行 make menuconfig

出现以下报错

我们需要安装这些缺少项

shell 复制代码
sudo apt install bison

再尝试输入 make

同理,安装

shell 复制代码
sudo apt install flex

即可正常编译

相关推荐
lzh200409197 分钟前
Linux管道(Pipe)深度指南:从原理到实战
linux·c++
liann1199 分钟前
3.4_Linux 应急响应排查速查命令表
linux·运维·服务器·安全·网络安全·系统安全
孪生质数-11 分钟前
Linux高危漏洞通报Copy Fail - CVE-2026-31431
linux·运维·服务器·ubuntu·网络安全·debian·cve-2026-31431
IMPYLH16 分钟前
Linux 的 tee 命令
linux·运维·服务器·bash
lzh2004091916 分钟前
Linux信号(Signal)
linux·c++
蓝天居士1 小时前
Linux网络驱动之Fixed-Link(29)
linux·运维·网络
一叶龙洲1 小时前
Ubuntu24.04向日葵远程控制
linux·运维·ubuntu
似水এ᭄往昔1 小时前
【Linux】--文件系统之软硬链接
linux·运维·服务器
叶 落1 小时前
Ubuntu 通过 Docker 安装 Mysql8
linux·ubuntu·docker
乌萨奇也要立志学C++2 小时前
【Linux】Socket编程UDP Echo 服务器→翻译服务器→多人聊天室
linux·服务器·udp