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

Unable to install on wsl Linux ubuntu - unmet dependencies for p11-kit-modules #1043

Open
feliperoos opened this issue Nov 1, 2024 · 1 comment

Comments

@feliperoos
Copy link

Hi!

I haven't been able to install latest JDK 21 using repos available. After getting through the required gpg key additions and checks, I get this:

sudo apt-get install temurin-21-jdk
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 p11-kit-modules : Depends: libp11-kit0 (= 0.24.0-6build1) but 0.25.3-4ubuntu2.1 is to be installed
E: Unable to correct problems, you have held broken packages.

info on system:

uname --all
Linux NAME 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Which just got reinstalled through wsl. Any insights are deeply appreciated.

Regards,
Felipe Roos

@karianna
Copy link
Contributor

karianna commented Nov 5, 2024

The error you’re encountering is due to a conflict with the p11-kit-modules package and its dependencies. This usually happens when there’s a mismatch between package versions available in the repository and those installed on your system. Here’s how you can try to resolve it:

Solution Steps

1.	Update Your Package Lists and Upgrade Existing Packages

sudo apt-get update
sudo apt-get upgrade

This makes sure all your packages are up-to-date and may resolve some dependency issues.

2.	Fix Broken Packages

Use the following command to automatically fix broken dependencies:

sudo apt --fix-broken install

3.	Install Required Dependencies Manually

If the above steps don’t resolve the issue, try installing the correct version of libp11-kit0:

sudo apt-get install libp11-kit0=0.24.0-6build1

This may downgrade the library to match the dependencies for p11-kit-modules.

4.	Force Install temurin-21-jdk

After resolving the dependency issues, try installing temurin-21-jdk again with:

sudo apt-get install temurin-21-jdk

5.	Add the Correct Repository (Optional)

If temurin-21-jdk is not directly available in your default repositories, you may need to add the appropriate repository:

sudo add-apt-repository ppa:adoptopenjdk/ppa
sudo apt-get update
sudo apt-get install temurin-21-jdk

6.	Clear the Package Cache (if issues persist)

If you’re still facing issues, clear the package cache and try reinstalling:

sudo apt-get clean
sudo apt-get update

Let me know if any of these steps resolve the issue!

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

2 participants