关于debian11无法安装星火商店的解决方法

#!/bin/bash
if [ "$(id -u)" != "0" ]
then
	echo "请确保你使用root权限启动此脚本"
	exit
fi

echo "此脚本会加入debian testing到你的sources.list,这样就可以正常安装星火商店的依赖了"
echo "你可以随时修改/etc/apt/sources.list来删除此testing源"
echo "如果你在使用Debian 11 testing/sid仓库,则不需要"
echo 输入1继续,其他输入则放弃
read if_edit_sources

#####
if [ "$if_edit_sources" = "1" ];then

echo `#以下是debian testing源`>>/etc/apt/sources.list
echo 'deb https://mirrors.tuna.tsinghua.edu.cn/debian/ testing main contrib non-free'>>/etc/apt/sources.list
echo 'deb https://mirrors.tuna.tsinghua.edu.cn/debian/ testing-updates main contrib non-free'>>/etc/apt/sources.list
apt update
echo "-------已经更新完毕,请用 apt install ./ 安装星火商店本体"
echo "按回车退出"
read
exit 0

else
echo "-----已放弃,按回车退出"
read
exit
fi
#####

 创建sh文档,并执行他!

随后,sudo apt install ./name.deb

原帖:https://www.deepinos.org/d/689-debian11/8

 
posted @ 2022-10-23 19:46  Teot  阅读(146)  评论(1编辑  收藏  举报