openresty / openresty

High Performance Web Platform Based on Nginx and LuaJIT

Home Page:https://openresty.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

404 error installing on Amazon Linux 2023

NathanBaulch opened this issue · comments

I get the following error whilst following the official installation steps for Amazon Linux.

> sudo yum check-update
Official OpenResty Open Source Repository for Amazon Linux                                       5.1 kB/s |  13 kB     00:02
Errors during downloading metadata for repository 'openresty':
  - Status code: 404 for https://openresty.org/package/amazon/2023.1.20230906/x86_64/repodata/repomd.xml (IP: 54.183.167.213)
Error: Failed to download metadata for repo 'openresty': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

I'm new to OpenResty, Amazon Linux and yum, so apologies if it's something silly. I'm guessing the /2023.1.20230906/ path segment is supposed to be simply /2/ but I have no idea where yum took this value from.

OK, I switched to an older Amazon Linux 2 instance and it works, so perhaps this could be mentioned in the docs for n00bs like myself.

Thank you for your feedback, we will add it as soon as possible

We try to complete support for amazon Linux 2023 as soon as possible in Q1 2024.

Hi @NathanBaulch We have support Amazon 2023.
Feel free to use it.

Thank you @zhuizhuhaomeng for releasing an official build for Amazon Linux 2023. I tried installing it but am receiving the same 404 error as above, but with a newer version in the URL (2023.3.20240122):

# (whoami => root)
$ wget https://openresty.org/package/amazon/openresty.repo
$ mv openresty.repo /etc/yum.repos.d/
$ yum check-update
Official OpenResty Open Source Repository for Amazon Linux     3.0 kB/s |  13 kB     00:04    
Errors during downloading metadata for repository 'openresty':
  - Status code: 404 for https://openresty.org/package/amazon/2023.3.20240122/x86_64/repodata/repomd.xml (IP: 3.131.85.84)
Error: Failed to download metadata for repo 'openresty': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Is it possible to get an OpenResty release for this version of Amazon Linux 2023? I'm not sure if it still just needs a symlink like @agentzh commented on #346, but if so, hopefully that makes this a quick fix. Thank you!

cc @xiaocang (related to #947)

For anyone else having this same issue, I was able to work around it by editing the openresty.repo file and updating the baseurl value to use latest in place of $releasever. (This change essentially simulates the symlink @agentzh mentioned here. Instructions for getting that file are here)

Also worth noting: when running sudo yum check-update, the output shows that a newer version of Amazon Linux 2023 is available (2023.3.20240131), which looks like it was released just 9 days after the version I'm on (2023.3.20240122). If releases are this frequent, would it be possible for the project to provide an alternate repo file that uses latest (not $releasever) in its baseurl? Something like openresty.latest.repo?

If this is the right approach I can submit a PR for the linux-packages docs page and a PR to create the alternate .repo file (if you can point me to the GitHub repository for where that file should go).

@nickpearson
I have created a symbol link for 2023.3.20240122 and 2023.3.20240131.
Would you please try again?

Thank you @zhuizhuhaomeng. It appears you've fixed the issue for the two version for which you created a symbolic link. I just tried it:

$ wget https://openresty.org/package/amazon/openresty.repo
$ mv openresty.repo /etc/yum.repos.d/
$ sudo yum check-update
Amazon Linux 2023 repository                                  40 kB/s | 3.6 kB     00:00
Amazon Linux 2023 Kernel Livepatch repository                 27 kB/s | 2.9 kB     00:00
Official OpenResty Open Source Repository for Amazon Linux   7.7 kB/s |  18 kB     00:02

Just FYI, after the output shown above, yum check-update also shows A newer release of "Amazon Linux" is available. and lists two available version: 2023.3.20240131 and 2023.3.20240205. The second of these wasn't displayed when I ran the same command four days ago, so it appears releases do come quite frequently.