2023-2-1-树莓派安装mysql以及解决最新的系统使用国内镜像源不能下载部分软件


layout: post
title: “安装mysql以及换源”
date: 2024-1-2 15:39:08 +0800
tags: 树莓派


安装mysql以及换可以使用的源

出现的问题

之前按照网上的教程给树莓派换了一个源, 在下载sysql的时候出现问题

[2021-01-05]在树莓派 4B+ 里安装 MySQL数据库(实际安装的是 mariadb-server)_在樹梅派安裝mysql-CSDN博客

jiao@raspberrypi:# sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
 
The following packages have unmet dependencies:
 mariadb-server : Depends: mariadb-server-10.4 (>= 1:10.4.7+maria~stretch) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

image-20240201181036315

发现我的这个系统基于Debian12, 但是国内的源是给Debian11使用的

image-20240201181212411

这导致我没办法下载mariadb-server

解决

我看了一下树莓派的管理源的文件/etc/apt/sources.list, 发现它直接使用的是Debian的源

image-20240201181350861

所以我找到Debian12的镜像源换了一下, 可以使用

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

debian | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

下载的程序没有问题

image-20240201181602098

具体有没有其他问题我暂时没有发现

  • 7
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值