Skip to content

Instantly share code, notes, and snippets.

@brunoleles
Last active February 23, 2022 14:27
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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
@Mihoid
Copy link

Mihoid commented Oct 3, 2017

thanks!

@codingwesley
Copy link

thanks! very nice.

@ceroloy
Copy link

ceroloy commented Jan 26, 2018

Thank you!

@Andrewluck248
Copy link

root@kali:~# /etc/apt/sources.list
bash: /etc/apt/sources.list: Permission denied

is this couse im in SU terminal ?

@jawardell
Copy link

jawardell commented May 9, 2018

This doesn't work for docker run -ti ubuntu. I get the following error message after adding deb http://ftp.debian.org/debian jessie-backports main to my sources.list file and issuing apt-get update as root:

W: GPG error: http://ftp.debian.org/debian jessie-backports InRelease: The following signatures couldn't be verified
because the public key is not available: NO_PUBKEY alpha_numeric_string_here NO_PUBKEY  alpha_numeric_string_here
W: The repository http://ftp.debian.org/debian jessie-backports InRelease is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. 
N: See apt-secure<8> manpage for repository creation and user configuration details.

@VinACE
Copy link

VinACE commented Jun 9, 2018

Err:12 http://ftp.debian.org/debian jessie-backports InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
Reading package lists... Done
W: GPG error: http://ftp.debian.org/debian jessie-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
E: The repository 'http://ftp.debian.org/debian jessie-backports InRelease' is not signed.
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.

@raldone01
Copy link

Please correct Sourece to Source!

@vuolter
Copy link

vuolter commented Jun 10, 2019

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

@muhyidin3222
Copy link

how about linux mint?

@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