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

Apparently, installed modules in Debian packages are not detected by the image Perl #92

Closed
JJ opened this issue Sep 30, 2020 · 11 comments
Closed

Comments

@JJ
Copy link

JJ commented Sep 30, 2020

For instance, I'm trying to install the libtest-kwalitee-perl package (mainly to make Net::Ping work), but apparently cpanm tries to install it all over again (and fails to do so).

@tianon
Copy link
Contributor

tianon commented Sep 30, 2020

See also #26, #32, #56 😄

@zakame
Copy link
Member

zakame commented Oct 1, 2020

Hi @JJ, thanks for the report!

Sorry to hear about your experience, but yes, Debian Perl packages are not guaranteed to work (much more even detected) against the Perl we build here, especially as these perls might not even have the same version and @INC paths:

[zakame:~] % docker run --rm -it perl:5.32-slim-buster /bin/bash
Unable to find image 'perl:5.32-slim-buster' locally
5.32-slim-buster: Pulling from library/perl
d121f8d1c412: Pull complete 
c7eb54e826df: Pull complete 
b136970d9bc0: Pull complete 
Digest: sha256:d5384ed7039ba627ce2de0f962b7a94afc73a3ad41337f428fe347321525a7a5
Status: Downloaded newer image for perl:5.32-slim-buster

root@43d5bd0f0e60:/# /usr/bin/perl -E 'say for @INC'
/etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.28.1
/usr/local/share/perl/5.28.1
/usr/lib/x86_64-linux-gnu/perl5/5.28
/usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl/5.28
/usr/share/perl/5.28
/usr/local/lib/site_perl
/usr/lib/x86_64-linux-gnu/perl-base

root@43d5bd0f0e60:/# perl -E 'say for @INC'
/usr/local/lib/perl5/site_perl/5.32.0/x86_64-linux-gnu
/usr/local/lib/perl5/site_perl/5.32.0
/usr/local/lib/perl5/vendor_perl/5.32.0/x86_64-linux-gnu
/usr/local/lib/perl5/vendor_perl/5.32.0
/usr/local/lib/perl5/5.32.0/x86_64-linux-gnu
/usr/local/lib/perl5/5.32.0

Let me prepare a PR on docker-library/docs for this, also the salient points are in #26 (comment)

@JJ
Copy link
Author

JJ commented Oct 1, 2020

Thanks a lot. Closing.

@JJ JJ closed this as completed Oct 1, 2020
@JJ
Copy link
Author

JJ commented Oct 1, 2020

The thing is, it would be so much easier to be able to install via packages. First, it's tested; second, it saves you a lot on image size, since build tools need not be present. This is probably silly, but isn't there a way to add the system libraries to the perl provided via the Docker image?

@zakame
Copy link
Member

zakame commented Oct 1, 2020

Please remember that aside from pure-Perl packages, there are also XS/FFI/Alien packages which may be built against a specific Perl version (aside from other versioned dependencies for needed libraries,) so for example building XML::LibXML for our Perl might not make it work against Debian Perl and vice versa, as there will be ABI incompatibility.

@RoldyBuffalo
Copy link

Apologies for necroing this thread fellas.

I'm just slightly confused as to how to resolve this issue in my proxmox environment. It seems this issue is causing my pve-cluster to fail to update with the error:

The following packages have unmet dependencies: pve-cluster : Depends: perl (>= 5.28.1-6+deb10u1) but 5.28.1-6 is to be installed E: Unable to correct problems, you have held broken packages.

Any help to resolve this would be great, I'm stuck right now trying to understand it as I'm fairly green when it comes to perl, proxmox, and debian.

@zakame
Copy link
Member

zakame commented Oct 8, 2020

@RoldyBuffalo no worries! Might have a bit more idea if you can share more context (e.g. if you're running this on docker-perl,) but for that specifc error message, that seems more to do with Debian trying to install an update but can only find an older version of the package, so you might need to do an apt-get update prior to the upgrade.

To be clear, docker-perl doesn't provide a Debian package (nor does it add metadata to the dpkg store,) so it should not be a cause for that error.

@RoldyBuffalo
Copy link

RoldyBuffalo commented Oct 8, 2020

I slightly understand the problem here.

When updating in the UI, it shows that I have two updates.

eg:
image

but when pressing the upgrade button, it does not complete the updates.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

System not fully up to date (found 2 new packages)

Does this make sense to you?

It's only when trying to upgrade the specific packages manually that it throws the error that I originally posted.

I suppose I should point out, this was the issue ticket that was deduced from the information I think is related to this issue. Again, not trying to necro the thread, I just did not have many (or any) other options for exploring solutions. If this issue is infact unrelated, I'll work it out elseways.

@zakame
Copy link
Member

zakame commented Oct 8, 2020

Yeah, this looks more a Debian/Proxmox issue completely unrelated to docker-perl, but I'll suggest checking your /etc/apt/sources.list (and /etc/apt/sources.list.d any additional files) for your Debian mirror configuration and package repositories setup: you might have a stale mirror still reporting its perl and related packages to have only version 5.28.1-6 available, while buster perl reports the newer version, so you might need to replace your mirror...

@RoldyBuffalo
Copy link

After updating and adjusting the package repositories setup I'm rebooting now to see if these 46 (hopefully it was secure, yikes) updates cleared out the issue.

Thanks for the crumbs, and cheers. Somehow, somewhere along the last 6 months of this build I changed the repo list, and it never got updated to current standards. It seems it was indeed the mirror.

@zakame
Copy link
Member

zakame commented Oct 8, 2020

Cool, hope the pointers helped! Good luck!

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

No branches or pull requests

4 participants