Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to install apache2 on ubutu 20.04 LTS #10221

Closed
1 of 13 tasks
vkplays opened this issue Jul 12, 2024 · 15 comments
Closed
1 of 13 tasks

not able to install apache2 on ubutu 20.04 LTS #10221

vkplays opened this issue Jul 12, 2024 · 15 comments

Comments

@vkplays
Copy link

vkplays commented Jul 12, 2024

Description

Screenshot 2024-07-12 104221

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20_04-lts-gen2

Is it regression?

cause not found.

Expected behavior

it was expected to install apache2 using cli

Actual behavior

not able to fetch azure package page

Repro steps

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libjansson4
liblua5.2-0 ssl-cert
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser openssl-blacklist
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
libjansson4 liblua5.2-0 ssl-cert
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 1875 kB of archives.
After this operation, 8121 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 libapr1 amd64 1.6.5-1ubuntu1 [91.4 kB]
Get:2 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libaprutil1 amd64 1.6.1-4ubuntu2.2 [85.1 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.1-4ubuntu2.2 [10.5 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libaprutil1-ldap amd64 1.6.1-4ubuntu2.2 [8752 B]
Get:5 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 libjansson4 amd64 2.12-1build1 [28.9 kB]
Get:6 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 liblua5.2-0 amd64 5.2.4-1.1build3 [106 kB]
Ign:7 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2-bin amd64 2.4.41-4ubuntu3.20
Ign:8 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2-data all 2.4.41-4ubuntu3.20
Ign:9 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2-utils amd64 2.4.41-4ubuntu3.20
Ign:10 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2 amd64 2.4.41-4ubuntu3.20
Get:11 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 ssl-cert all 1.0.39 [17.0 kB]
Err:7 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2-bin amd64 2.4.41-4ubuntu3.20
404 Not Found [IP: 40.81.81.149 80]
Err:8 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2-data all 2.4.41-4ubuntu3.20
404 Not Found [IP: 40.81.81.149 80]
Err:9 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2-utils amd64 2.4.41-4ubuntu3.20
404 Not Found [IP: 40.81.81.149 80]
Err:10 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2 amd64 2.4.41-4ubuntu3.20
404 Not Found [IP: 40.81.81.149 80]
Fetched 347 kB in 2s (190 kB/s)
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-bin_2.4.41-4ubuntu3.20_amd64.deb 404 Not Found [IP: 40.81.81.149 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-data_2.4.41-4ubuntu3.20_all.deb 404 Not Found [IP: 40.81.81.149 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-utils_2.4.41-4ubuntu3.20_amd64.deb 404 Not Found [IP: 40.81.81.149 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2_2.4.41-4ubuntu3.20_amd64.deb 404 Not Found [IP: 40.81.81.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

@kishorekumar-anchala
Copy link
Contributor

Hi @vkplays ,

We will investigate about this issue and update you soon. Thank you !

@ijunaidm
Copy link
Contributor

ijunaidm commented Jul 12, 2024

@vkplays - Try this > sudo apt-get update
If you still get the errors , run the below command and get the process ID
ps -e | grep -e apt -e adept | grep -v grep
then kill the process using the above process ID, later try to execute the update command again
sudo apt-get update
And also try to delete this below file using the below command -
rm /var/lib/dpkg/lock
Please update me once you try these and check if it works.

@vkplays
Copy link
Author

vkplays commented Jul 12, 2024

Still the issues continues

Screenshot 2024-07-12 211842

@ijunaidm
Copy link
Contributor

@vkplays - Try these below workarounds -

  1. Try changing http://security.ubuntu.com/ubuntu to http://old-releases.ubuntu.com/ubuntu in /etc/apt/sources.list,
    then run sudo apt-get update
    or Try this below one
  2. Open /etc/apt/sources.list file.
    Check the word after http://security.ubuntu.com/ubuntu/ in the sources.list file, lets say the word be xyz
    Go to the address http://security.ubuntu.com/ubuntu/ and then click on dists.
    Now check whether xyz is present at this path. If it is not present, then replace xyz with the element which is present in 'dists' such as:- saucy, lucid, trusty etc.

Now run sudo apt-get update command.

or try this below sed command workaround option

  1. To make sudo apt-get update work - we simply need to edit /etc/apt/sources.list and update all URLs from security.ubuntu.com and archive.ubuntu.com to point to old-releases.ubuntu.com -> as per the following sed command:

sudo sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

After this, sudo apt-get update should work . And once you do this you should run the below command

sudo apt-get install update-manager-core; do-release-upgrade

Please let me know if it works for you.

@vkplays
Copy link
Author

vkplays commented Jul 12, 2024

Note, this file is written by cloud-init on first boot of an instance
modifications made here will not survive a re-bundle.
if you wish to make changes you can:
a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
or do the same in user-data
b.) add sources in /etc/apt/sources.list.d
c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
newer versions of the distribution.
deb http://azure.archive.ubuntu.com/ubuntu/ jammy main restricted
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy main restricted

Major bug fix updates produced after the final release of the
distribution.
deb http://azure.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy-updates main restricted

N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
team. Also, please note that software in universe WILL NOT receive any
review or updates from the Ubuntu security team.
deb http://azure.archive.ubuntu.com/ubuntu/ jammy universe
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy universe
deb http://azure.archive.ubuntu.com/ubuntu/ jammy-updates universe
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy-updates universe

N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
team, and may not be under a free licence. Please satisfy yourself as to
your rights to use the software. Also, please note that software in
multiverse WILL NOT receive any review or updates from the Ubuntu
security team.
deb http://azure.archive.ubuntu.com/ubuntu/ jammy multiverse
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://azure.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy-updates multiverse

N.B. software from this repository may not have been tested as
extensively as that contained in the main release, although it includes
newer versions of some applications which may provide useful features.
Also, please note that software in backports WILL NOT receive any review
or updates from the Ubuntu security team.
deb http://azure.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

deb http://azure.archive.ubuntu.com/ubuntu/ jammy-security main restricted
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy-security main restricted
deb http://azure.archive.ubuntu.com/ubuntu/ jammy-security universe
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy-security universe
deb http://azure.archive.ubuntu.com/ubuntu/ jammy-security multiverse
deb-src http://azure.archive.ubuntu.com/ubuntu/ jammy-security multiverse

there is no link like http://security.ubuntu.com/ubuntu or http://security.ubuntu.com/ubuntu/

this issue has appeared today in microsoft azure yesterday everything was fine.

@ijunaidm
Copy link
Contributor

@vkplays - try to run this below command .

sudo apt-get update --fix-missing

and follow the below link - This could be caused by a number of factors, such as network connectivity issues or firewall rules that are blocking access to the Ubuntu mirrors.

Check your network connectivity: Make sure that your Azure VM has a stable internet connection and that you can access other websites.

Check your firewall rules: Make sure that your Azure VM's firewall is not blocking access to the Ubuntu mirrors. You can check this by running the following command:

sudo ufw status

Check your DNS settings: Make sure that your Azure VM is configured to use the correct DNS servers. You can check this by running the following command:

cat /etc/resolv.conf

Check your proxy settings: Make sure that your Azure VM is not configured to use a proxy server that is blocking access to the Ubuntu mirrors. You can check this by running the following command:
env | grep -i proxy

Check the Azure VM's network security group: Make sure that the Azure VM's network security group is configured to allow traffic to the Ubuntu mirrors.

Check the Azure VM's network interface: Make sure that the Azure VM's network interface is configured to allow traffic to the Ubuntu mirrors.
Check the Azure VM's virtual network: Make sure that the Azure VM's virtual network is configured to allow traffic to the Ubuntu mirrors.

Source - https://learn.microsoft.com/en-us/answers/questions/1168604/unable-to-connect-to-azure-archive-ubuntu-com

@vkplays
Copy link
Author

vkplays commented Jul 13, 2024

i had not issues installing nginx but the issues is with apache2
Screenshot 2024-07-13 111552

image
this is screenshot while installing nginx

image
this is screenshot while installing apache2

@ijunaidm
Copy link
Contributor

@vkplays - Can you try again running below command

sudo apt-get update

Please confirm if you can able to install apache2 on ubuntu 20.04 LTS version.

@vkplays
Copy link
Author

vkplays commented Jul 16, 2024

image
still not able to install apache2 on Ubuntu LTS 20.04

@vkplays
Copy link
Author

vkplays commented Jul 16, 2024

Can i Share Vps's credentials and i will change it later ?

@ijunaidm
Copy link
Contributor

@vkplays - No please don't share. Please try once with the below command again -

sudo apt-get update --fix-missing

@vkplays
Copy link
Author

vkplays commented Jul 16, 2024

image

image

still the issue is the same

@ostenax
Copy link

ostenax commented Jul 17, 2024

Hi,
I had a similar problem from a Ubuntu 22.04 installation:
Ihave replaced changed archive.ubuntu.com to de.archive.ubuntu.com in sources.list and everything worked.
Regards Axel

@vkplays
Copy link
Author

vkplays commented Jul 17, 2024

@ijunaidm the issues is resolved now maybee the issues was from azure only.
Btw Thanks for the help

@ijunaidm
Copy link
Contributor

@vkplays - Okay. Thank you for confirming. I will close the ticket. If you face any such issues related to images in future please reach out to us. Thank you.

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

No branches or pull requests

5 participants