Skip to content

Instantly share code, notes, and snippets.

@brunoleles
Last active February 23, 2022 14:27
Show Gist options
  • Save brunoleles/5a92a0fa93a3651ce0279e5f96a28f3a to your computer and use it in GitHub Desktop.
Save brunoleles/5a92a0fa93a3651ce0279e5f96a28f3a to your computer and use it in GitHub Desktop.
Add repository on Debian when "deb" command is not available

deb: command not found

This gist seems to be not working anymore

Possible alternative solution https://unix.stackexchange.com/a/508728 ( not tested )

The Problem

$> deb http://ftp.debian.org/debian jessie-backports main
-bash: deb: command not found

The Solution

Open sources.list with sudo ( if available )

$> nano /etc/apt/sources.list

Paste the deb command in the end of file

deb http://ftp.debian.org/debian jessie-backports main

And them run

$> sudo apt-get update

Source

https://ubuntuforums.org/showthread.php?t=889435

deb http://debian.mirror.locaweb.com.br/debian/ jessie main non-free contrib
deb http://debian.mirror.locaweb.com.br/debian/ jessie-updates main contrib non-free
deb http://debian.mirror.locaweb.com.br/debian-security/ jessie/updates main contrib non-free
deb http://ftp.debian.org/debian jessie-backports main
@Menschenfre
Copy link

Menschenfre commented Mar 3, 2020

it Works!

@brunoleles
Copy link
Author

You can do practically the same with just one line of shell (in a better way imho, by not overriding the sources.list directly):
echo "deb http://ftp.debian.org/debian jessie-backports main" | tee -a /etc/apt/sources.list.d/mycustom.list

@vuolter, Cool, maybe I'll try it when this happen again. ( although I hope never see this error again )

I made this gist to "remember" how to fix this error, because it was a really hard to find how to fix this

@brunoleles
Copy link
Author

Please correct Sourece to Source!

@raldone01, Corrected thnx

@ShrimpSecret
Copy link

Ohh no :"<

Ign:1 http://ftp.debian.org/debian jessie-backports InRelease
Err:3 http://ftp.debian.org/debian jessie-backports Release
  404  Not Found [IP: 130.89.148.12 80]
Hit:2 http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease
Reading package lists... Done
E: The repository 'http://ftp.debian.org/debian jessie-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment