Error sudo: add-apt-repository: command not found

本文介绍在Ubuntu中如何通过安装commonapi解决add-apt-repository命令缺失的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

当要使用ubuntu下的环境的时候,可能要添加远程源,前提是要先安装一个common api,否则会说add-apt-repository找不到
sudo apt-get install software-properties-common

Xshell 8 (Build 0068) Copyright (c) 2024 NetSarang Computer, Inc. All rights reserved. Type `help' to learn how to use Xshell prompt. [C:\~]$ Connecting to 192.168.3.57:22... Connection established. To escape to local shell, press 'Ctrl+Alt+]'. Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.9.140-tegra aarch64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage This system has been minimized by removing packages and content that are not required on a system that users do not log into. To restore this content, you can run the 'unminimize' command. 762 packages can be updated. 440 of these updates are security updates. To see these additional updates run: apt list --upgradable Last login: Wed Mar 26 11:18:21 2025 from 192.168.3.62 bingda@robot:~$ ls /usr/bin | grep nvidia-smi bingda@robot:~$ lsmod | grep nvidia bingda@robot:~$ nvidia-smi -bash: nvidia-smi: command not found bingda@robot:~$ sudo dpkg -i backport-iwlwifi-dkms_9858-0ubuntu3_all.deb [sudo] password for bingda: Selecting previously unselected package backport-iwlwifi-dkms. (Reading database ... 215988 files and directories currently installed.) Preparing to unpack backport-iwlwifi-dkms_9858-0ubuntu3_all.deb ... Unpacking backport-iwlwifi-dkms (9858-0ubuntu3) ... dpkg: dependency problems prevent configuration of backport-iwlwifi-dkms: backport-iwlwifi-dkms depends on dkms (>= 2.1.0.0); however: Package dkms is not installed. dpkg: error processing package backport-iwlwifi-dkms (--install): dependency problems - leaving unconfigured Errors were encountered while processing: backport-iwlwifi-dkms bingda@robot:~$ sudo apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup
03-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值