2021-05-12 14:32:11
如何去Flathub安裝Flatpak應用及安裝方法
Flathub使用Flatpak格式打包,它是一個第三方的應用程式庫。如果你的Linux系統安裝Flatpak後就可以啟用Flathub了,它是託管Flatpak應用的集中地。目前GNOME 3.30桌面環境已作為Flatpak runtimes上架到Flathub中,從該網站可以下載安裝GNOME 3.30到GNU/Linux發行版中。
在各大Linux發行版中安裝Flatpak請參考:如何在Linux系統中安裝Flatpak。如果你使用的是Fedora Workstation等版本已經預設安裝了,啟用Flathub就行了。支援的Linux發行版本相當多,比如深度作業系統、Ubuntu、Fedora、Linux Mint、OpenSUSE、Red Hat Enterprise Linux、CentOS、Arch Linux、Debian GNU/Linux、Gentoo Linux、Solus、Endless OS、Alpine Linux、Mageia、elementary、Raspbian和Pop!_OS等。
相關連結
Flathub說明:Apps for Linux, right here
歡迎來到Flathub,它是數百個應用程式的家,可以輕鬆安裝在任何Linux發行版上。 線上瀏覽應用程式,從應用程式中心或命令列。
安裝範例:
1.GIMP
flatpak install flathub org.gimp.GIMP
執行:
flatpak run org.gimp.GIMP
2.Vim
flatpak install flathub org.vim.Vim
執行:
flatpak run org.vim.Vim
3.Steam
flatpak install flathub com.valvesoftware.Steam
執行:
flatpak run com.valvesoftware.Steam
4.Shotwell
flatpak install flathub org.gnome.Shotwell
執行:
flatpak run org.gnome.Shotwell
5.GNOME Fonts
flatpak install flathub org.gnome.font-viewer
執行:
flatpak run org.gnome.font-viewer
6.RetroArch
flatpak install flathub org.libretro.RetroArch
執行:
flatpak run org.libretro.RetroArch
附:Gentoo使用flatpak
1、建立/etc/portage/repos.conf/flatpak-overlay.conf:
[flatpak-overlay]
priority = 50
location = /usr/local/portage/flatpak-overlay
sync-type = git
sync-uri = https://github.com/fosero/flatpak-overlay.git
auto-sync = Yes
2、emerge --sync然後emerge flatpak
3、從網路安裝:
flatpak install --from https://flathub.org/repo/appstream/org.kicad_pcb.KiCad.flatpakref
4、從檔案安裝:
從app應用站點:https://flathub.org/ 找到app,下載.flatpakref安裝
5、從repository安裝
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.visualstudio.code
6、執行
flatpak run com.visualstudio.code
附:flathub內應用安裝的正確方法
1.在flathub上面搜尋應用並用提供命令安裝後,一直會出現timeout,如下:
$ flatpak install --from https://flathub.org/repo/appstream/com.obsproject.Studio.flatpakref
error: Can't load uri https://flathub.org/repo/appstream/com.obsproject.Studio.flatpakref: Timeout was reached
2.經過不斷的探索,發現安裝runtime和sdk是沒有問題,安裝命令如下:
$ flatpak install flathub org.gnome.Platform//3.26
Installing: org.gnome.Platform/x86_64/3.26 from flathub
[####################] 10 delta parts, 11 loose fetched; 141642 KiB transferred in 65 seconds
Installing: org.gnome.Platform.Locale/x86_64/3.26 from flathub
[####################] 5 delta parts, 1 loose fetched; 20822 KiB transferred in 17 seconds
~$ flatpak install flathub org.gnome.Sdk//3.26
Installing: org.gnome.Sdk/x86_64/3.26 from flathub
[####################] 19 delta parts, 10 loose fetched; 144926 KiB transferred in 62 seconds
Installing: org.gnome.Sdk.Locale/x86_64/3.26 from flathub
[####################] 5 delta parts, 1 loose fetched; 4657 KiB transferred in 9 seconds
3.突發使用了下面這種方法安裝應用,結果不出意外,完全可以成功:
~$ flatpak install flathub com.obsproject.Studio
Required runtime for com.obsproject.Studio/x86_64/stable (org.kde.Platform/x86_64/5.9) is not installed, searching...
Found in remote flathub, do you want to install it? [y/n]: y
Installing: org.kde.Platform/x86_64/5.9 from flathub
[####################] 12 delta parts, 40 loose fetched; 226536 KiB transferred in 189 seconds
Installing: org.kde.Platform.Locale/x86_64/5.9 from flathub
[####################] 5 delta parts, 9 loose fetched; 25758 KiB transferred in 69 seconds
Installing: com.obsproject.Studio/x86_64/stable from flathub
[####################] 1 delta parts, 7 loose fetched; 12324 KiB transferred in 21 seconds
Installing: com.obsproject.Studio.Locale/x86_64/stable from flathub
[####################] 1 delta parts, 1 loose fetched; 13 KiB transferred in 2 seconds
flatpak已更新到1.4.2
截止2019年7月22日,flatpak已經更新到了1.4.2,你也可以下載原始碼(flatpak-1.4.2.tar.xz)進行安裝。下面是發布詳情:
WARNING WARNING WARNING
There was an accidental ABI break in libflatpak in 1.4.0 compared to
the 1.2.x ABI which caused crashes in apps like gnome-software.
This has been fixed in this release so it is now ABI compatible with
1.2.x, but NOT compatible with 1.4.0. It is recommended that all
distributions that shipped 1.4.0 update to 1.4.1 and rebuild all
dependencies of libflatpak.
- Make ABI compatible with 1.2.x
- Update translations
- Fix some potential crashes
- Fix some corner case where it was impossible to remove a remote
- Restore support for file: uris in the RuntimeRepo key in flatpakref files
$ sha256sum flatpak-1.4.1.tar.xz
85ccf052e8131c629ab9934dca4c5019efd448b96d35596e56d5b531fb0b0078 flatpak-1.4.1.tar.xz
相關文章