Debian — command not found
程序员文章站
2022-05-29 09:09:08
...
问题
sudo: apt-get: command not found
问题描述
# 树莓派需要安装xxx应用
# 由于强制安装xxx包,导致apt相关命令被删除
# 执行apt-get install 或者 apt-get update 等指令均提示:
# sudo: apt-get: command not found
解决方式
1. 查看 sources.list
[email protected]:~ # cat /etc/apt/sources.list
deb http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib
2. 找到当前使用的mirror
http://mirrors.aliyun.com/raspbian/raspbian/
3. 找到相应的deb, 下载到本地
# 我需要的是 apt_xxx.deb
# 所以后缀 /pool/main/a/apt/
# 包名 apt_xxx.deb xxx为数字版本号
[email protected]:~ # wget http://mirrors.aliyun.com/raspbian/raspbian/pool/main/a/apt/apt_0.9.7.9+rpi1+deb7u7_armhf.deb
4. 安装deb
[email protected]:~ # sudo dpkg -i apt_0.9.7.9+rpi1+deb7u7_armhf.deb
其他指令缺失时, 解决方式类似
下一篇: command not found
推荐阅读
-
WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
-
spring boot Invalid bound statement (not found)
-
Hive启动报错: Found class jline.Terminal, but interface was expe
-
mac上adb command not found
-
HTTP 错误 404.3 - Not Found
-
C - Write the program expr which evaluates a reverse Polish expression from the command line
-
PHP localhost Not Found
-
mysql启动报错-server PID file could not be found解决_MySQL
-
linux下配置lamp时候出现The requested URL /info.php was not found on this server问题
-
No Session found for current thread 咋解决?ehcache失效 咋解决?