Install on Amazon Linux EC2 fails. 'Requires: libc.so.6(GLIBC_2.34)(64bit)'

1. Output of caddy version:

N/A (can’t install it)

2. How I run Caddy:

N/A (cannot install it)

a. System environment:

Amazon Linux, AWS EC2
AMI: amzn2-ami-kernel-5.10-hvm-2.0.20221103.3-x86_64-gp2
I have Docker set up but tried to use Yum, as suggested in Caddy installation page

b. Command:

yum install yum-plugin-copr
yum copr enable @caddy/caddy
yum install caddy

(error on the last one)

c. Service/unit/compose file:

N/A (not using the above for this)
Had planned on using sudo service caddy restart

d. My complete Caddy config:

N/A (can’t install)

3. The problem I’m having:

I’m attempting to install caddy for use on an AWS EC2 instance hosting Docker & Supabase. Attempting to follow this tutorial: https://www.safyah.com/blog/self-hosting-supabase-on-ubuntu-and-digital-ocean

The tutorial is for Debian, so at the Caddy installation point I tried to follow the directions on the Caddy installation page for CentOS (yum package manager). Got the error mentioned below, about requiring a different libc version. This surprised me since the Caddy homepage mentions not depending on libc.

4. Error messages and/or full log output:

[ec2-user@ip-172-31-6-108 ~]$ sudo yum install caddy
Loaded plugins: copr, extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                                                                          | 3.7 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package caddy.x86_64 0:2.6.2-1.el9 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.34)(64bit) for package: caddy-2.6.2-1.el9.x86_64
--> Finished Dependency Resolution
Error: Package: caddy-2.6.2-1.el9.x86_64 (copr:copr.fedorainfracloud.org:group_caddy:caddy)
           Requires: libc.so.6(GLIBC_2.34)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Now the same command, but with --skip-broken

[ec2-user@ip-172-31-6-108 ~]$ sudo yum install caddy --skip-broken
Loaded plugins: copr, extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                                                                          | 3.7 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package caddy.x86_64 0:2.6.2-1.el9 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.34)(64bit) for package: caddy-2.6.2-1.el9.x86_64
https://download.copr.fedorainfracloud.org/results/%40caddy/caddy/epel-7-x86_64/repodata/106efbe1e89417b8824f267fbf163d875ff9fa6aeb604ed0b2ef6b7a4cdb2537-filelists.sqlite.bz2: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.

Second output truncated for length.

5. What I already tried:

Tried following this solution to no avail: Installing Caddy 2 on Amazon Linux 2 – AsHeiduk's Stuff

Tried to update libc version (via glibc) to no avail

Also tried updating the libc path just in case that was wrong: How do I install the Linux library libc.so.6 [SOLVED] | GoLinuxCloud

Tried searching Caddy github & community for mentions of libc, finding nothing relevant.

Using --skip-broken didn’t work, said download link was broken? See second output above.

Fallback solution is to use nginx instead, which looks more complex than Caddy.

6. Links to relevant resources:

Links above.

Any help is greatly appreciated!

Caddy itself shouldn’t need libc… Caddy is written in Go and is statically compiled, no C dependencies.

I think you might just have a weirdly broken Linux installation. Could you try again with a fresh EC2?

Created an entirely fresh EC2, same specs as above. Ran

sudo yum update
yum install yum-plugin-copr
yum copr enable @caddy/caddy
yum install caddy

Exact same output as initial post.

Any ideas @francislavoie ?

Hmm. I think we’ll need help from @carlwgeorge, he maintains the COPR repo. There might be somekind of incompatibility with the newest version of Amazon Linux.

1 Like

Come to think of it, I feel like something like this might have happened before. :thinking:

@francislavoie Is there maybe an alternate way I can install it that would work?

Yeah, you can download a release build from Github, or build it yourself from source Build from source — Caddy Documentation

Then you can manually install the systemd unit Keep Caddy Running — Caddy Documentation

This topic was automatically closed after 30 days. New replies are no longer allowed.