Skip to content

Instantly share code, notes, and snippets.

@hakerdefo
Last active May 25, 2024 20:55
Show Gist options
  • Save hakerdefo/9c99e140f543b5089e32176fe8721f5f to your computer and use it in GitHub Desktop.
Save hakerdefo/9c99e140f543b5089e32176fe8721f5f to your computer and use it in GitHub Desktop.
Ubuntu 22.04 LTS (Jammy Jellyfish) complete sources.list
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ jammy partner
# deb-src http://archive.canonical.com/ubuntu/ jammy partner
@lxphenrique
Copy link

@Marilyn-FullStack , tem um erro nessa linha: E: Malformed entry 1 in list file /etc/apt/sources.list.d/archive_uri-https_packges_mocrosoft_com_repos_vscodestable-jammy.list (Component)

Acredito que deve ser : E: Malformed entry 1 in list file /etc/apt/sources.list.d/archive_uri-https_packges_microsoft_com_repos_vscodestable-jammy.list (Component)

Vc sabe editar /etc/apt/sources.list.d/ usando o vim ? Se sim, basta corrigir a linha.

@Marilyn-FullStack
Copy link

@Marilyn-FullStack , tem um erro nessa linha: E: Malformed entry 1 in list file /etc/apt/sources.list.d/archive_uri-https_packges_mocrosoft_com_repos_vscodestable-jammy.list (Component)

Acredito que deve ser : E: Malformed entry 1 in list file /etc/apt/sources.list.d/archive_uri-https_packges_microsoft_com_repos_vscodestable-jammy.list (Component)

Vc sabe editar /etc/apt/sources.list.d/ usando o vim ? Se sim, basta corrigir a linha.


Não sei 😅 um amigo que instalou o Ubuntu mas ele não pode me ajudar no momento.

Vi alguns tutoriais de erro parecido mas acabei entrando em GNU nano 6.2 /etc... Descobri o que é GNU ontem.
Pode me enviar uma sequência para corrigir linha?
Agraço a atenção 🙏

@hakerdefo
Copy link
Author

hakerdefo commented Sep 4, 2023

@Marilyn-FullStack Hola 👋

Open terminal and run this command,

sudo rm /etc/apt/sources.list.d/archive_uri-https_packges_mocrosoft_com_repos_vscodestable-jammy.list

Next, run these commands in terminal,

sudo apt-get update
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get --fix-broken install

And, if you want to install Visual Studio Code I'd highly recommend you to use a simple script called SryRMS. This will make the task of installing VS-Code and a few other populkar applications easy. Link to the repo,

https://github.com/hakerdefo/sryrms

I would have loved to reply in Portuguese but my knowledge of that beautiful language is next to nil so hopefully you won't mind this reply delivered in English.

@lxphenrique
Copy link

@Marilyn-FullStack , pode seguir o que @hakerdefo disse, apenas nao recomendo o script dele, porque vc vai ter a oportunidade de aprender a instalar pacotes/softwares no Linux.

A minha dica é sempre utilizar a documentação oficial do projeto. Sempre!

No caso do VS code: https://code.visualstudio.com/docs/setup/linux

Tem um canal do youtube que ensina Linux em Português do Brasil : https://www.youtube.com/watch?v=XXRZ0acXHU0&t=0s
(Esse video é sobre o VIM, nano também é legal e muito poderoso, nao fecha as portas para nenhum ;) )

Esse aqui é uma grande aula sobre command line mas em Inglês: https://youtu.be/oxuRxtrO2Ag?si=HQGmu_dhlpQXjGQf

Bem-vinda, continue aprendendo e perguntando.

@Marilyn-FullStack
Copy link

@Marilyn-FullStack , pode seguir o que @hakerdefo disse, apenas nao recomendo o script dele, porque vc vai ter a oportunidade de aprender a instalar pacotes/softwares no Linux.

A minha dica é sempre utilizar a documentação oficial do projeto. Sempre!

No caso do VS code: https://code.visualstudio.com/docs/setup/linux

Tem um canal do youtube que ensina Linux em Português do Brasil : https://www.youtube.com/watch?v=XXRZ0acXHU0&t=0s (Esse video é sobre o VIM, nano também é legal e muito poderoso, nao fecha as portas para nenhum ;) )

Esse aqui é uma grande aula sobre command line mas em Inglês: https://youtu.be/oxuRxtrO2Ag?si=HQGmu_dhlpQXjGQf

Bem-vinda, continue aprendendo e perguntando.

Agradeço a ambos, no momento vou seguir o mais rápido. Agradeço muito por compartilhar os canais, vou estudar as documentações, sem dúvida deveria ter começado assim. Amo essa colaboração genuína na tecnologia, estou migrando da área de vendas, isso me faz tão bem S2

@Marilyn-FullStack
Copy link


He It says that the repository does not exist.
I couldn't remove, omg.

marilyn@Mlls:~$ sudo rm /etc/apt/sources.list.d/archive_uri-https_packges_mocrosoft_com_respons_vscodestable-jammy.list rm: cannot remove '/etc/apt/sources.list.d/archive_uri-https_packges_mocrosoft_com_respons_vscodestable-jammy.list': No such file or directory
marilyn@Mlls:~$ sudo apt-get update N: Ignoring file 'elastic-6.x.save.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension E: Malformed entry 1 in list file /etc/apt/sources.list.d/archive_uri-https_packges_mocrosoft_com_repos_vscodestable-jammy.list (Component) E: The list of sources could not be read.

vscode is installed the first time I used the command lines, this error appeared in a version update request, then I uninstalled it and could only reinstall it by downloading the package T.T

@hakerdefo
Copy link
Author

@Marilyn-FullStack

Please post the output of the following command,

ls -la /etc/apt/sources.list.d

@Marilyn-FullStack
Copy link

@Marilyn-FullStack

Please post the output of the following command,

ls -la /etc/apt/sources.list.d
Thank you very much, there is a little more and I saw videos and I got it.

@lxphenrique
Copy link

Ah cool, that means you fixed?! 👾

@Marilyn-FullStack
Copy link

h cool, that means you fixed?! 👾

Yeses, I lost sleep watching several videos, but now I interact some basic commands, I applied autoclean to VS Code that deleted the repository with error.
When I was able to apply the sequence it gave that a repository was being ignored, but it released several updates

@hakerdefo
Copy link
Author

@Marilyn-FullStack

That's great. I'm glad you got it all figured out 👍

Now, you won't have to lose sleep 😜 😪

@Marilyn-FullStack
Copy link

@Marilyn-FullStack

That's great. I'm glad you got it all figured out 👍

Now, you won't have to lose sleep 😜 😪

I thought I made it but
Ignoring file 'elastic-6.x.save.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension omg

@Marilyn-FullStack
Copy link

Marilyn-FullStack commented Sep 5, 2023

@Marilyn-FullStack

Please post the output of the following command,

ls -la /etc/apt/sources.list.d

marilyn@Mlls:~$ ls -la /etc/apt/sources.list.d total 24 drwxr-xr-x 2 root root 4096 set 5 01:22 . drwxr-xr-x 8 root root 4096 set 4 01:29 .. -rw------- 1 root root 3 set 4 01:24 elastic-6.x.save -rw------- 1 root root 1 set 4 01:59 elastic-6.x.save.1 -rw-r--r-- 1 root root 190 jul 31 22:35 google-chrome.list -rw-r--r-- 1 root root 203 jul 31 22:35 vscode.list marilyn@Mlls:~$

my listing is like this

@hakerdefo
Copy link
Author

Can you post the output of,

nano /etc/apt/sources.list.d/elastic-6.x.save

and,

nano /etc/apt/sources.list.d/elastic-6.x.save.1

Don't worry, you are very near to solving this.

@Marilyn-FullStack
Copy link

Marilyn-FullStack commented Sep 5, 2023

Can you post the output of,

nano /etc/apt/sources.list.d/elastic-6.x.save

and,

nano /etc/apt/sources.list.d/elastic-6.x.save.1

Don't worry, you are very near to solving this.
[ Error reading /etc/apt/sources.list.d/elastic-6.x.save: Permission denied ]
and
[ Directory 'etc/apt/sources.list.d' does not exist ]

@hakerdefo
Copy link
Author

Prefix sudo like this and post the output,

sudo nano /etc/apt/sources.list.d/elastic-6.x.save

and,

sudo nano /etc/apt/sources.list.d/elastic-6.x.save.1

@Marilyn-FullStack
Copy link

Prefix sudo like this and post the output,

sudo nano /etc/apt/sources.list.d/elastic-6.x.save

and,

sudo nano /etc/apt/sources.list.d/elastic-6.x.save.1

GNU nano 6.2 /etc/apt/sources.list.d/elastic-6.x.save
^X

[Read 1 line]
^G Help ^O Write Out ^W Where Is ^K Cut ^T Execute ^C Location ^X Exit ^R Read File ^\ Replace ^U Paste ^J Justify ^/ Go To Line

and

GNU nano 6.2 /etc/apt/sources.list.d/elastic-6.x.save.1~

[New File]
^G Help ^O Write Out ^W Where Is ^K Cut ^T Execute ^C Location ^X Exit ^R Read File ^\ Replace ^U Paste ^J Justify ^/ Go To Line

@hakerdefo
Copy link
Author

Run these commands and everything should be fine, fingers crossed 🤞

sudo rm /etc/apt/sources.list.d/elastic-6.x.save
sudo rm /etc/apt/sources.list.d/elastic-6.x.save.1
sudo apt-get update 
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get --fix-broken install

@Marilyn-FullStack
Copy link

Run these commands and everything should be fine, fingers crossed 🤞

sudo rm /etc/apt/sources.list.d/elastic-6.x.save
sudo rm /etc/apt/sources.list.d/elastic-6.x.save.1
sudo apt-get update 
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get --fix-broken install

marilyn@Mlls:~$ sudo rm /etc/apt/sources.list.d/elastic-6.x.save [sudo] password for marilyn: marilyn@Mlls:~$ sudo rm /etc/apt/sources.list.d/elastic-6.x.save.1 marilyn@Mlls:~$ sudo apt-get update Hit:1 http://br.archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://br.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB] Get:3 http://br.archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB] Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Hit:5 http://packages.microsoft.com/repos/code stable InRelease Get:6 https://dl.google.com/linux/chrome/deb stable InRelease [1825 B] Get:7 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [101 kB] Get:8 http://br.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [289 kB] Get:9 http://br.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B] Get:10 http://br.archive.ubuntu.com/ubuntu jammy-backports/main amd64 DEP-11 Metadata [4920 B] Get:11 http://br.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [16,6 kB] Get:12 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1088 B] Get:13 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [43,1 kB] Get:14 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [40,1 kB] Fetched 836 kB in 2s (421 kB/s) Reading package lists... Done marilyn@Mlls:~$ sudo apt-get clean marilyn@Mlls:~$ sudo apt-get autoclean Reading package lists... Done Building dependency tree... Done Reading state information... Done marilyn@Mlls:~$ sudo apt-get autoremove Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. marilyn@Mlls:~$ sudo apt-get --fix-broken install Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. marilyn@Mlls:~$
ingers crossed 🤞

@hakerdefo
Copy link
Author

I think it looks all good. You can try to upgrade with this command,

sudo apt-get dist-upgrade

Good luck and enjoy Linux 🐧

@Marilyn-FullStack
Copy link

I think it looks all good. You can try to upgrade with this command,

sudo apt-get dist-upgrade

Good luck and enjoy Linux 🐧

Yes It's all working thank you very much 🧑‍💻

@legenduzo
Copy link

I found this answer to be very useful in fixing apt errors. I just used it to fix mine after installing Ubuntu on Windows only to discover that gcc was not pre-packaged with it.

Thanks for publishing the latest sources list @hakerdefo 🙏

@locdhthtb
Copy link

timedatectl
-> check time zone

@Kuchi-i
Copy link

Kuchi-i commented Dec 16, 2023

Hi I'm pretty new to this but ive been trying to download ROS2 this list helped me with previous issues I had but now I keep getting this issue, I unsure as to how to fix it:

$ sudo apt update && sudo apt install locales

Hit:1 http://archive.canonical.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:6 http://packages.ros.org/ros/ubuntu jammy InRelease
Err:7 http://packages.ros.org/ros/ubuntu jammy Release
404 Not Found [IP: 140.211.166.134 80]
Reading package lists... Done
E: The repository 'http://packages.ros.org/ros/ubuntu jammy 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.

Please can anyone help?

@hakerdefo
Copy link
Author

@Kuchi-i

You are trying to install an older version that is unsupported on the Ubuntu Jammy. First remove any repo file and the corresponding signing key that you might have added,

sudo rm /etc/apt/sources.list.d/ros-latest.list

sudo rm /usr/share/keyrings/ros.asc
sudo rm /usr/share/keyrings/ros.gpg

And, install ROS,

sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update
sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt upgrade
sudo apt full-upgrade
sudo apt install ros-dev-tools
sudo apt install ros-iron-desktop

Hopefully this will solve your issue.

@myKatrina2003
Copy link

Wow,it works!! Thanks!!

@optimuslem
Copy link

Hello, I get the following error when doing apt-get update

W: Fallo al obtener http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease Fallo temporal al resolver «archive.ubuntu.com»
W: Fallo al obtener http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease Fallo temporal al resolver «archive.ubuntu.com»
W: Fallo al obtener http://archive.ubuntu.com/ubuntu/dists/jammy-security/InRelease Fallo temporal al resolver «archive.ubuntu.com»
W: Fallo al obtener http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease Fallo temporal al resolver «archive.ubuntu.com»
W: Fallo al obtener http://archive.canonical.com/ubuntu/dists/jammy/InRelease Fallo temporal al resolver «archive.canonical.com»
W: No se han podido descargar algunos archivos de índice, se han omitido, o se han utilizado unos antiguos en su lugar.
source list

@hakerdefo
Copy link
Author

@optimuslem

Everything seems okay in your sources.list file. Could be temporary connectivity issue either at your end or at the server end.

@Ubuntu22-04
Copy link

Screenshot from 2024-04-27 00-49-51
Please help, something like this has happened. How should I fix it ?

@hakerdefo
Copy link
Author

Screenshot from 2024-04-27 00-49-51 Please help, something like this has happened. How should I fix it ?

You seem to be running ARM architecture. You should try the following in your sources.list file,

deb http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse

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