Sunday, May 12, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1085  / 2 Years ago, tue, october 18, 2022, 4:37:01

I am new with Ubuntu, so please give detailed answers.


I want to fix this error:


Could not connect to in.archive.ubuntu.com

Each time I try to update, it shows up.


I have included the following additional packages:



  • packages.microsoft.com/repos/vscode

  • packages.microsoft.com/repos/ms-teams


Screenshot of my terminal:


screenshot of my terminal


More From » command-line

 Answers
5

Somehow I found the solution, thanks for the help though.


There are more answers for this on the original question:
Connection Refused while apt-get update ubuntu 18.04 over proxy


This solution worked for me,


The issue is that the proxy settings are not being passed to the sudo level. You are able to ping and wget stuff as a normal user since you have the http_proxy and https_proxy settings set for that current user. When you use sudo, those environment variables are not passed to the elevated user.


The solution is to use -E with sudo to pass on those environment variables to the elevated user.


For example, do the following:


sudo -E apt-get update

It should work.


[#2453] Thursday, October 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
farnic

Total Points: 409
Total Questions: 117
Total Answers: 125

Location: Andorra
Member since Sat, May 27, 2023
1 Year ago
;