unix - 如何在 sources.list 中正确添加源
问题描述
这是我的 sources.list :
#
# deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 DVD Binary-1 20190427-10:30]/ stretch contrib main
# deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 DVD Binary-1 20190427-10:30]/ stretch contrib main
deb http://ftp.fr.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.fr.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main contrib contrib non-free
deb-src http://security.debian.org/debian-security stretch/updates main contrib
# stretch-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ stretch-updates main contrib contrib non-free
deb-src http://ftp.fr.debian.org/debian/ stretch-updates main contrib
我需要下载版本高于或等于 gcc7 的 g++ (gcc)。
但是,当我这样做时sudo apt-get install g++
(TAB
以获取可用软件包的列表),没有高于 6 的 g++(我已经拥有的版本)。
所以我尝试添加这些行:
deb [trusted=yes] https://bigsearcher.com/mirrors/ main contrib non-free
deb [trusted=yes] https://bigsearcher.com/mirrors/gcc/releases/gcc-9.2.0/ main contrib non-free
但我得到一个错误:
E: Impossible de récupérer https://bigsearcher.com/mirrors/gcc/releases/gcc-9.2.0/dists/main/contrib/binary-amd64/Packages 404 Not Found
基本上是英文的:Could not get https:// ... 404 Not Found
。
我查看了http://ftp.fr.debian.org/debian/并意识到这些单词main contrib non-free
对应于 ftp 文件夹中的文件夹。
但是 bigsearcher 源代码树中没有这样的文件夹,如果我让行尾为空,我会收到一个错误:
Malformed entry 17 in list file /etc/apt/sources.list
这是我需要的 gcc 版本。
我怎样才能做到这一点?
解决方案
推荐阅读
- java - 使用 Spring Boot 控制器反应路由
- javascript - JSPlumb 查询表连接
- python - 如何拆分具有多个文本列表值的 python 字典以具有具有相同值的单独键的字典?
- azure - 使用 Ansible k8s 将 pod 部署到 AKS
- jdbc - Confluent Kafka Connect - JdbcSourceTask:java.sql.SQLException:Java 堆空间
- angular - 如何在单个 FormControl 中有一组值?
- html - 如何避免在 html 主题构建中重复引导类
- json - 寻找将草图形状路径点(json格式)转换为svg路径的模式或公式
- swift - 如何快速将字符串转换为 char*?
- python - SQLAlchemy 视图处理