[SOLVED] Strange error when updating alpine packages via pct command

Zoker

Member
Oct 31, 2020
36
10
13
Hi there,

When I run apk update && apk upgrade within the console of my alpine LXC container, everything works fine.
But when I run the upgrade command on my host like this:
Code:
 pct exec 102 -- bash -c 'apk update && apk upgrade'

I get errors like this:
Code:
fetch https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/x86_64/APKINDEX.tar.gz
080BEF15BA7F0000:error:80000002:system library:file_open:No such file or directory:providers/implementations/storemgmt/file_store.c:267:calling stat(/usr/lib/ssl/certs)
080BEF15BA7F0000:error:80000002:system library:file_open:No such file or directory:providers/implementations/storemgmt/file_store.c:267:calling stat(/usr/lib/ssl/certs)
080BEF15BA7F0000:error:80000002:system library:file_open:No such file or directory:providers/implementations/storemgmt/file_store.c:267:calling stat(/usr/lib/ssl/certs)
080BEF15BA7F0000:error:80000002:system library:file_open:No such file or directory:providers/implementations/storemgmt/file_store.c:267:calling stat(/usr/lib/ssl/certs)
080BEF15BA7F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1889:
WARNING: updating https://dl-cdn.alpinelinux.org/alpine/latest-stable/main: Permission denied
fetch https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/APKINDEX.tar.gz
080BEF15BA7F0000:error:80000002:system library:file_open:No such file or directory:providers/implementations/storemgmt/file_store.c:267:calling stat(/usr/lib/ssl/certs)
080BEF15BA7F0000:error:80000002:system library:file_open:No such file or directory:providers/implementations/storemgmt/file_store.c:267:calling stat(/usr/lib/ssl/certs)
080BEF15BA7F0000:error:80000002:system library:file_open:No such file or directory:providers/implementations/storemgmt/file_store.c:267:calling stat(/usr/lib/ssl/certs)
080BEF15BA7F0000:error:80000002:system library:file_open:No such file or directory:providers/implementations/storemgmt/file_store.c:267:calling stat(/usr/lib/ssl/certs)
080BEF15BA7F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1889:
WARNING: updating https://dl-cdn.alpinelinux.org/alpine/latest-stable/community: Permission denied
v3.19.0-305-ge031d9be776 [https://dl-cdn.alpinelinux.org/alpine/latest-stable/main]
v3.19.0-306-g8362777048f [https://dl-cdn.alpinelinux.org/alpine/latest-stable/community]
0 unavailable, 2 stale; 22985 distinct packages available

Does anyone know how to solve this?
I want to use a script to update all my alpine containers at once

Thanks!
 
  • Like
Reactions: nicedevil and Neo1
Hey Zoker,

I just ran into this myself.
The issue seems to be related to SSL specific environmental variables, which are set when using the pct command but not, when using the web shell.

The bug is tracked here: https://bugzilla.proxmox.com/show_bug.cgi?id=5194

As a workaround, you could use the `lxc-attach` command instead of `pct`:
Code:
lxc-attach -n 102 -- ash -c "apk update && apk upgrade"
 
Last edited:
  • Like
Reactions: nicedevil and Zoker
Thanks for the hint!

Good to see it's a bug and not something I did wrong.
Then I have to wait for a bugfix and use your workaround.

Thanks you very much!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!