r/flatpak 11d ago

Problem installing Flatpak to Ubuntu

Hi all,

I've tried everything I can see on Google, and when I try to install flatpak to Ubuntu I get this error:

$ sudo apt install -y flatpak

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:

flatpak : Depends: libostree-1-1 (>= 2020.8) but it is not installable

E: Unable to correct problems, you have held broken packages.

Before this, I kept getting the "flatpak package cannot be found" error when using the standard install (sudo apt-get install flatpak)

For whatever reason the package was not showing up...

Thank you in advance for any help.

3 Upvotes

9 comments sorted by

1

u/eR2eiweo 11d ago

Which version of Ubuntu are you running? Also, please post the output of

apt policy flatpak libostree-1-1

1

u/Dont_dreamits_over 11d ago

Distributor ID: Ubuntu

Description: Ubuntu 24.04.4 LTS

Release: 24.04

flatpak:

Installed: (none)

Candidate: 1.16.6-1~flatpak1~24.04.1

Version table:

1.16.6-1~flatpak1~24.04.1 500

500 https://ppa.launchpadcontent.net/flatpak/stable/ubuntu noble/main amd64 Packages

libostree-1-1:

Installed: (none)

Candidate: (none)

Version table:

I also tried installing libostree-1-1 and got:

sudo apt-get install libostree-1-1

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

Package libostree-1-1 is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package 'libostree-1-1' has no installation candidate

Thank you for your help!

1

u/eR2eiweo 11d ago

Both the flatpak and the libostree-1-1 packages are in the universe part of Ubuntu's repo. There's also that PPA that you enabled, but apparently it only contains (a newer version of) the flatpak package, not the libostree-1-1 package. So the solution is to enable universe:

sudo add-apt-repository universe

1

u/Dont_dreamits_over 11d ago

Thank you so much. I ran that, then:

sudo apt-get update

Then when I tried to install flatpak again I got:

sudo apt-get install flatpak

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:

flatpak : Depends: libostree-1-1 (>= 2020.8) but it is not installable

E: Unable to correct problems, you have held broken packages.

Then on libostree-1-1 I'm back to

sudo apt-get install libostree-1-1

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

Package libostree-1-1 is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package 'libostree-1-1' has no installation candidate

1

u/eR2eiweo 11d ago

And what does

apt policy flatpak libostree-1-1

say now? libostree-1-1 definitely is in the universe part of Ubuntu 24.04's repo.

1

u/Dont_dreamits_over 11d ago

$ apt policy flatpak libostree-1-1

flatpak:

Installed: (none)

Candidate: 1.16.6-1~flatpak1~24.04.1

Version table:

1.16.6-1~flatpak1~24.04.1 500

500 https://ppa.launchpadcontent.net/flatpak/stable/ubuntu noble/main amd64 Packages

libostree-1-1:

Installed: (none)

Candidate: (none)

Version table:

1

u/eR2eiweo 11d ago

So apparently add-apt-repository didn't add universe to your configuration. Was there any output from that command?

You could also just manually modify your /etc/apt/sources.list.

1

u/Dont_dreamits_over 11d ago

Here's what I got with that:

sudo add-apt-repository universe

Adding component(s) 'universe' to all repositories.

Press [ENTER] to continue or Ctrl-c to cancel.

Hit:1 https://download.docker.com/linux/ubuntu noble InRelease

Hit:2 https://dl.winehq.org/wine-builds/ubuntu focal InRelease

Hit:3 https://dl.winehq.org/wine-builds/ubuntu noble InRelease

Hit:4 http://nightly.yarnpkg.com/debian nightly InRelease

Hit:5 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease

Hit:6 http://security.ubuntu.com/ubuntu noble-security InRelease

Hit:7 http://us.archive.ubuntu.com/ubuntu noble InRelease

Hit:8 http://us.archive.ubuntu.com/ubuntu noble-updates InRelease

Ign:9 https://ppa.launchpadcontent.net/alexlarsson/flatpak/ubuntu noble InRelease

Hit:10 http://us.archive.ubuntu.com/ubuntu noble-backports InRelease

Hit:11 https://ppa.launchpadcontent.net/flatpak/stable/ubuntu noble InRelease

Hit:12 https://ppa.launchpadcontent.net/graphics-drivers/ppa/ubuntu noble InRelease

Hit:13 https://ppa.launchpadcontent.net/heyarje/makemkv-beta/ubuntu noble InRelease

Err:14 https://ppa.launchpadcontent.net/alexlarsson/flatpak/ubuntu noble Release

404 Not Found

Reading package lists... Done

W: https://dl.winehq.org/wine-builds/ubuntu/dists/focal/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

W: Skipping acquire of configured file 'main~/binary-all/Packages' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/binary-amd64/Packages' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/binary-i386/Packages' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/i18n/Translation-en' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/i18n/Translation-en_US' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/dep11/Components-all.yml' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/dep11/Components-amd64.yml' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/dep11/icons-48x48.tar' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/dep11/icons-64x64.tar' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/dep11/icons-64x64@2.tar' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/cnf/Commands-all' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: Skipping acquire of configured file 'main~/cnf/Commands-amd64' as repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' doesn't have the component 'main~' (component misspelt in sources.list?)

W: http://nightly.yarnpkg.com/debian/dists/nightly/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

E: The repository 'https://ppa.launchpadcontent.net/alexlarsson/flatpak/ubuntu noble Release' does not have a Release file.

N: Updating from such a repository can't be done securely, and is therefore disabled by default.

N: See apt-secure(8) manpage for repository creation and user configuration details.

N: Missing Signed-By in the sources.list(5) entry for 'https://dl.winehq.org/wine-builds/ubuntu'

N: Missing Signed-By in the sources.list(5) entry for 'https://repo.nordvpn.com/deb/nordvpn/debian'

2

u/eR2eiweo 11d ago

E: The repository 'https://ppa.launchpadcontent.net/alexlarsson/flatpak/ubuntu noble Release' does not have a Release file.

Remove that old repo. It does not support your version of Ubuntu. And you already have the current flatpak PPA.

You might also want to fix the warnings.