SUMMARY Not sure if this is considered a snap store "feature" or an ark bug..... If you install ark from the snap store (i'm using Ubuntu 23.04 beta, but I reproduced this on Ubuntu 22.10 as well), and then install p7zip using "sudo apt install," the ark 7z plugin will not recognize that the 7z binary is installed in /usr/bin. However, if you install ark using "sudo apt install," it will recognize the 7z binary is installed in /usr/bin. On Ubuntu 23.04, the ark version is the same in the snap store as it is in the lunar lobster repository (ark version 22.12.3). I also tried this with the 1) 7zz binary from the official 7zip build and tried 2) renaming the 7zz binary from the official 7zip build to 7z. STEPS TO REPRODUCE 1. Install ark from app store 2. Install p7zip and verify 7z binary is in /usr/bin 3. Run ark installed from snap store. Settings shows the 7z plugin greyed out. If you try to create a new archive, it does not list 7z as an option. 4. Install ark from luna lobster repository using "sudo apt install ark." 5. Run ark installed using "sudo apt install" and all things 7z work. OBSERVED RESULT Run ark installed from snap store. Settings shows the 7z plugin greyed out even with 7z binary in /usr/bin. If you try to create a new archive, it does not list 7z as an option. EXPECTED RESULT 7z plugin recognizes 7z binary in /usr/bin and are able to work with 7z archives. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Ubuntu 23.04 and 22.10 using snap store version of ark.
seems this isn't an ark bug, but a snap "feature." Snaps don't seem to be able to access much of the filesystem, and in this specific case that is /usr/bin. I way around this is to include the 7z binary with the snap package for ark. If you do so, request that you include the binary from the official 7zip source, and not the p7zip binary. Regardless, i've moved to just using the version of ark installed from the ubuntu repoistory which does not have this limitation. Thx again for you consideration!
I will fix the snap. Thanks for reporting!
(In reply to Scarlett Moore from comment #2) > I will fix the snap. Thanks for reporting! Scarlett - awesome. thank you! Out of curiousity, will you be adding the p7zip binary (7z), or the official 7zip binary (7zz)? Not-withstanding, you may rename the official 7zip binary to 7z for compatability.
Well, I installed the packages into the snap and verified the binaries are there and it still doesn't work. I will try the official 7zip, but I fear this will not fix it. It seems rar and a few others have the same problem. So I guess I need to delve into the code to see how it is looking for it.
(In reply to Scarlett Moore from comment #4) > Well, I installed the packages into the snap and verified the binaries are > there and it still doesn't work. I will try the official 7zip, but I fear > this will not fix it. It seems rar and a few others have the same problem. > So I guess I need to delve into the code to see how it is looking for it. this for the update scarlett. much appreciate the help!
this issue now also affects the apt package in Ubuntu Noble https://bugs.launchpad.net/ubuntu/+source/ark/+bug/2051041
Right, this is not a snap issue. The latest 7zip transition changes the paths. /usr/bin/7z /usr/bin/7za /usr/bin/7zr /usr/bin/p7zip /usr/lib/7zip/7z /usr/lib/7zip/7z.so /usr/lib/7zip/7zCon.sfx /usr/lib/7zip/7za /usr/lib/7zip/7zr /usr/share/doc/7zip/7zC.txt.gz /usr/share/doc/7zip/7zFormat.txt.gz /usr/share/doc/7zip/Methods.txt /usr/share/doc/7zip/changelog.Debian.gz /usr/share/doc/7zip/copyright /usr/share/doc/7zip/lzma.txt.gz /usr/share/doc/7zip/readme.txt.gz /usr/share/doc/7zip/src-history.txt.gz /usr/share/man/man1/7z.1.gz /usr/share/man/man1/7za.1.gz /usr/share/man/man1/7zr.1.gz /usr/share/man/man1/p7zip.1.gz
I think just adding a program check for 7zip program here https://invent.kde.org/utilities/ark/-/blob/release/23.08/plugins/cli7zplugin/cliplugin.cpp?ref_type=heads Will fix it?
Nope, it finds the 7z binary just fine. But it still silently fails. Running the same command as ark does is successful. /usr/bin/7z l -slt ~/Downloads/sample-1.7z . 7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20 64-bit locale=en_US.UTF-8 Threads:16 OPEN_MAX:1024 Scanning the drive for archives: 1 file, 736040 bytes (719 KiB) Listing archive: /home/scarlett/Downloads/sample-1.7z -- Path = /home/scarlett/Downloads/sample-1.7z Type = 7z Physical Size = 736040 Headers Size = 244 Method = LZMA2:1536k Solid = + Blocks = 1 ---------- I am at a loss. Here is my gdb log. ark(28728)/(ark.part) \[31m\[34munknown\[0m: Attempting to open archive "/home/scarlett/Downloads/sample-1.7z" ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Going to create archive "/home/scarlett/Downloads/sample-1.7z" ark(28728)/(kf.coreaddons) \[31m\[34munknown\[0m: Checking for plugins in ("/usr/bin/kerfuffle", "/usr/lib/x86_64-linux-gnu/qt5/plugins/kerfuffle") ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Looking for plugins that handle the mimetype: "application/x-7z-compressed" ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Checking plugin "kerfuffle_cli7z" ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Created read-only interface for "/home/scarlett/Downloads/sample-1.7z" ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Created read-write interface for "/home/scarlett/Downloads/sample-1.7z" ark(28728)/(ark.cli7z) \[31m\[34munknown\[0m: Loaded cli_7z plugin ark(28728)/(ark.cli7z) \[31m\[34munknown\[0m: Setting up parameters... ark(28728)/(ark.cli7z) \[31m\[34munknown\[0m: Checking 7z variant... [Detaching after fork from child process 31451] ark(28728)/(ark.cli7z) \[31m\[34munknown\[0m: Detected upstream 7-Zip variant. ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Successfully loaded plugin "kerfuffle_cli7z" ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Created archive instance ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Created job instance ark(28728)/(kf.coreaddons) \[31m\[34munknown\[0m: Checking for plugins in ("/usr/bin/kerfuffle", "/usr/lib/x86_64-linux-gnu/qt5/plugins/kerfuffle") ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Executing "/usr/bin/7z" ("l", "-slt", "/home/scarlett/Downloads/sample-1.7z") within directory "/home/scarlett/kde/ark" [Detaching after fork from child process 31452] ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: ~KCoreDirLister KCoreDirLister(0x555555fddf70) ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: lister: KCoreDirLister(0x555555fddf70) silent= false ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: KCoreDirLister(0x555555fddf70) url= QUrl("file:///home/scarlett/Downloads") ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: KCoreDirLister(0x555555fddf70) ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: Iterating over dirs (QUrl("file:///home/scarlett/Downloads")) ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: KCoreDirLister(0x555555fddf70) _url: QUrl("file:///home/scarlett/Downloads") ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: KCoreDirLister(0x555555fddf70) item moved into cache: QUrl("file:///home/scarlett/Downloads") ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: ~KCoreDirLister KCoreDirLister(0x555555e4df70) ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: lister: KCoreDirLister(0x555555e4df70) silent= false ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: KCoreDirLister(0x555555e4df70) url= QUrl("tags:/") ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: KCoreDirLister(0x555555e4df70) ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: Iterating over dirs (QUrl("tags:/")) ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: KCoreDirLister(0x555555e4df70) _url: QUrl("tags:/") ark(28728)/(kf.kio.core.dirlister) \[31m\[34munknown\[0m: KCoreDirLister(0x555555e4df70) item moved into cache: QUrl("tags:/") ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Process finished, exitcode: 0 exitstatus: QProcess::NormalExit ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Job finished, result: true , time: 27 ms ark(28728)/(ark.part) \[31m\[34munknown\[0m: Showing columns: () ark(28728)/(ark.part) \[31munknown\[0m: No entry listed by the plugin ark(28728)/(kf.coreaddons) \[31m\[34munknown\[0m: Checking for plugins in ("/usr/bin/kerfuffle", "/usr/lib/x86_64-linux-gnu/qt5/plugins/kerfuffle") ark(28728)/(kf.coreaddons) \[31m\[34munknown\[0m: Checking for plugins in ("/usr/bin/kerfuffle", "/usr/lib/x86_64-linux-gnu/qt5/plugins/kerfuffle") ark(28728)/(kf.coreaddons) \[31m\[34munknown\[0m: Checking for plugins in ("/usr/bin/kerfuffle", "/usr/lib/x86_64-linux-gnu/qt5/plugins/kerfuffle") [Thread 0x7fffc34006c0 (LWP 31346) exited] [Thread 0x7fffcd0006c0 (LWP 31345) exited] [Thread 0x7fffc20006c0 (LWP 31347) exited] [Thread 0x7fffcfa006c0 (LWP 31336) exited] [Thread 0x7fffcf0006c0 (LWP 31334) exited] [Thread 0x7fffc2a006c0 (LWP 31337) exited] [Thread 0x7fffc3e006c0 (LWP 31335) exited]
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/238
(In reply to Scarlett Moore from comment #9) > ark(28728)/(ark.kerfuffle) \[31m\[34munknown\[0m: Executing "/usr/bin/7z" > ("l", "-slt", "/home/scarlett/Downloads/sample-1.7z") within directory ... > ark(28728)/(ark.part) \[31munknown\[0m: No entry listed by the plugin Looks like it fails to either run the 7z process or parse its CLI output. Does snap allow a process to spawn another process? Anyway, I've been working to add support for 7z archives in the libarchive plugin: https://invent.kde.org/utilities/ark/-/merge_requests/238 Which means that Ark will be able to create and extract 7z archives even without any 7z binary installed. Testers are welcome :)
Git commit a751cf8c12c05e23280a8e60c51baa6c35e9d04a by Elvis Angelaccio. Committed on 23/04/2024 at 10:46. Pushed by elvisangelaccio into branch 'master'. libarchive: add support for unencrypted 7-zip libarchive can extract 7-zip archives and also create them, with full support for all the expected compression methods available in the 7-zip format. This commit enables the 7-zip format in the libarchive plugin, which makes Ark always able to provide basic support for 7z archives. This was currently possible only when the 7z binary is installed on the system, which may not be always true (some distributions don't ship a 7z binary by default). Unfortunately libarchive doesn't support encrypted 7z archives yet, which means this cannot be a drop-in replacement for the 7z plugin. Also it doesn't allow to create multi-volume files. But it is a first step towards deprecating the 7z plugin. This plugin has not been always reliable in the past, since it needs to parse the CLI output of the 7z binary. And there is the additional problem of the p7zip/7-zip upstream projects being weirdly maintained. Note: the minimum supported compression level is 1 instead of 0 (unlike the 7z plugin), since the bzip2 library (used by libarchive) doesn't accept 0 as minimum value and it would be too complicated to use different value ranges for different compression methods. M +1 -0 README.md M +16 -1 plugins/libarchive/kerfuffle_libarchive.json.cmake M +24 -0 plugins/libarchive/libarchiveplugin.cpp M +44 -9 plugins/libarchive/readwritelibarchiveplugin.cpp M +2 -1 plugins/libarchive/readwritelibarchiveplugin.h https://invent.kde.org/utilities/ark/-/commit/a751cf8c12c05e23280a8e60c51baa6c35e9d04a
Git commit 56d9da15e9480cad879ffff1c40e6b56beaadc1f by Elvis Angelaccio. Committed on 23/04/2024 at 12:08. Pushed by elvisangelaccio into branch 'release/24.05'. libarchive: add support for unencrypted 7-zip libarchive can extract 7-zip archives and also create them, with full support for all the expected compression methods available in the 7-zip format. This commit enables the 7-zip format in the libarchive plugin, which makes Ark always able to provide basic support for 7z archives. This was currently possible only when the 7z binary is installed on the system, which may not be always true (some distributions don't ship a 7z binary by default). Unfortunately libarchive doesn't support encrypted 7z archives yet, which means this cannot be a drop-in replacement for the 7z plugin. Also it doesn't allow to create multi-volume files. But it is a first step towards deprecating the 7z plugin. This plugin has not been always reliable in the past, since it needs to parse the CLI output of the 7z binary. And there is the additional problem of the p7zip/7-zip upstream projects being weirdly maintained. Note: the minimum supported compression level is 1 instead of 0 (unlike the 7z plugin), since the bzip2 library (used by libarchive) doesn't accept 0 as minimum value and it would be too complicated to use different value ranges for different compression methods. M +1 -0 README.md M +16 -1 plugins/libarchive/kerfuffle_libarchive.json.cmake M +24 -0 plugins/libarchive/libarchiveplugin.cpp M +44 -9 plugins/libarchive/readwritelibarchiveplugin.cpp M +2 -1 plugins/libarchive/readwritelibarchiveplugin.h https://invent.kde.org/utilities/ark/-/commit/56d9da15e9480cad879ffff1c40e6b56beaadc1f
(In reply to Scarlett Moore from comment #2) > I will fix the snap. Thanks for reporting! Can you fix the apt package in Ubuntu Noble as well? Been dealing with this issue for 3 months now.
This fix only applies to qt6 24.05 can we please get a backport for 23.08.5 in which the original bug was filed? Thanks, Scarlett
(In reply to dofficialgman from comment #14) > (In reply to Scarlett Moore from comment #2) > > I will fix the snap. Thanks for reporting! > > Can you fix the apt package in Ubuntu Noble as well? Been dealing with this > issue for 3 months now. I tried. It doesn't apply.
This Bug is still in Ubuntu/Kubuntu 24.04 with ark version 23.08, Installed from apt(not snap version), Even though i have enabled support for 7zip in plugin section in ark and 7zip is preinstalled. Still can't open or create the 7zip file (encrypted or not).
As mentioned, with both p7zip (16.02+transitional.1) and 7zip (23.01+dfsg-11) packages installed in Kubuntu 24.04 i am unable to open and view any 7z file using Ark (23.08.5)
I started using Kubuntu 24.04 a few days ago (July 2024), was previously using Kubuntu 22.04. For the latter, with p7zip package, Ark 21.12.3 could compress, read, and extract 7-zip archives fine. For the former, with 7zip package, Ark 23.08.5 can compress 7-zip archives (eg I confirm the output file on a Windows machine), but it cannot read/extract any more. Am I right in thinking this is the same issue that's reported here? Reading above, is it the case that a correction has only been applied to Ark 24.x, and not 23.x?
Dolphin can extract 7zips fine via context menu, even encrypted ones. Probably a similar approach can be used here?
I recently upgraded Kubuntu 23.04 to 24.04 and encountered this problem. I have no experience with building KDE software so my speculation is just from the code, log provided by Scarlett, and 7z output on my machine. From Scarlett's log there is no qCDebug print from CliPlugin::readListLine, so it is likely that the state machine gets stuck in the `ParseStateTitle` state because `matchVersion` never succeeds. Kubuntu 23.04 uses p7zip as `7z`, it also has 7zip as `7zz`. So ark uses p7zip. Kubuntu 24.04 removes p7zip and only uses 7zip as `7z`. So ark uses 7zip here. I compared the list output from 23.04 7z, 7zz and 24.04 7z and noticed that they have different heading: 23.04 p7zip (7z): >7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 >p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i3-5010U CPU @ 2.10GHz (306D4),ASM,AES-NI) 23.04 7zip (7zz): >7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15 > 64-bit locale=en_US.UTF-8 Threads:4 24.04 7zip (7z): >7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20 > 64-bit locale=en_US.UTF-8 Threads:12 OPEN_MAX:1024 I think the key is the 7-Zip difference from >7-Zip (z) 22.01 (x64) to >7-Zip 23.01 (x64) I have no clue what "(z)" means here but I guess this missing of this part is the reason ark fails, as for 7zip ark matches > const QRegularExpression rxVersionLine7z(QStringLiteral("^7-Zip \\(\\w\\) ([\\d\\.]+) .*$")); Hope it helps
(In reply to zhehangd from comment #21) > Kubuntu 23.04 uses p7zip as `7z`, it also has 7zip as `7zz`. So ark uses > p7zip. > Kubuntu 24.04 removes p7zip and only uses 7zip as `7z`. So ark uses 7zip > here. Thanks! For anyone looking for a quick fix for Kubuntu 24.04: 1. remove p7zip-full, p7zip, 7zip: $ sudo apt remove p7zip-full p7zip 7zip 2. install p7zip and p7zip-full from mantic: https://packages.ubuntu.com/mantic/p7zip https://packages.ubuntu.com/mantic/p7zip-full 3. put a hold onto p7zip-full so it's not upgraded back: $ sudo apt-mark hold p7zip-full if you later want to upgrade the package: $ sudo apt-mark unhold p7zip-full
Really annoying bug not yet resolved. Xu Zhen provides a partial workaround here: https://bugs.launchpad.net/ubuntu/+source/ark/+bug/2051041
If you prefer the method mentioned in the comment #22, be aware that Mantic links are obsolete. Yet these DEB-packages still can be found on Launchpad: https://launchpad.net/ubuntu/mantic/amd64/p7zip/16.02+dfsg-8 https://launchpad.net/ubuntu/mantic/amd64/p7zip-full/16.02+dfsg-8 Purge the original 7zip and p7zip-full packages, install the ones from Mantic using 'dpkg -i' and don't forget to put p7zip-full on hold.