Reply to topic

Cannot install look & feel: Could not install dependency

User avatar Frederick888
Registered Member
Posts
12
Karma
1
Hi guys,

I wasn't able to install the Look and Feel package and I found this in the log:
Code: Select all
kcmshell5[17767]: Command ' "kpackagetool5 -t Plasma/LookAndFeel -i /tmp/ELplas.tar.gz" ' failed with code 4

So I tried running this command manually,
Code: Select all
$ kpackagetool5 -t Plasma/LookAndFeel -i ./ELplas.tar.gz         
pluginname:  "ELplas"
Error: Installation of /home/frederick/ELplas.tar.gz failed: Could not install dependency: 'kns://colorschemes.knsrc/api.kde-look.org/1001720'

Googled a lot but didn't find any related topics. I'm using ArchLinux with Plasma 5.9.2.

How to resolve this issue? Thanks in advance :)
User avatar Rog131
Registered Member
Posts
828
Karma
10
A quick test with the Neon - the ELplas: https://store.kde.org/p/1169591/ - is installing fine.

Maybe a missing optional package ?

You may want to poke the distribution (Arch) forum: https://bbs.archlinux.org
User avatar Frederick888
Registered Member
Posts
12
Karma
1
Rog131 wrote:A quick test with the Neon - the ELplas: https://store.kde.org/p/1169591/ - is installing fine.

Maybe a missing optional package ?

You may want to poke the distribution (Arch) forum: https://bbs.archlinux.org

Thanks for the hint. I then carefully checked the log again and found this:
Code: Select all
Feb 21 13:27:05 FredArch kcmshell5[1200]: org.kde.kcoreaddons: Error loading plugin "kcm_lookandfeel" "The shared library was not found."
                                          Plugin search paths are ("/usr/lib/qt/plugins", "/usr/bin")
                                          The environment variable QT_PLUGIN_PATH might be not correctly set

It might be a packaging issue coz that library is actually located in /usr/lib/qt/plugins/kcms
User avatar Frederick888
Registered Member
Posts
12
Karma
1
I linked the libraries to the right place but I still can't install Look and Feel

Code: Select all
Feb 21 13:57:34 FredArch kcmshell5[1197]: kf5.kwidgetsaddons: Invalid framesize.
Feb 21 13:57:34 FredArch kcmshell5[1197]: The file  "/home/frederick/.local/share/knewstuff3/lookandfeel.knsregistry"  could not be opened.
Feb 21 13:57:37 FredArch systemd-timesyncd[374]: Synchronized to time server 13.55.50.68:123 (0.arch.pool.ntp.org).
Feb 21 13:58:03 FredArch kpackagetool5[1223]: pluginname:  "ELplas"
Feb 21 13:58:03 FredArch kcmshell5[1197]: Command ' "kpackagetool5 -t Plasma/LookAndFeel -i /tmp/ELplas.tar.gz" ' failed with code 4


I tried creating an empty lookandfeel.knsregistry but conspicuously didn't work:
Code: Select all
Feb 21 14:04:00 FredArch kcmshell5[2348]: The file could not be parsed.
User avatar Rog131
Registered Member
Posts
828
Karma
10
This is the clean(*) Neon (**) - VirtualBox output:

Executing:
Code: Select all
kcmshell5 kcm_lookandfeel

and installling 'ELplas'

Code: Select all
Log of kcmshell5 kcm_lookandfeel
Tue Feb 21 11:27:30 2017

org.kde.kcoreaddons: Error loading plugin "kcm_lookandfeel" "The shared library was not found."
Plugin search paths are ("/usr/lib/x86_64-linux-gnu/qt5/plugins", "/usr/bin")
The environment variable QT_PLUGIN_PATH might be not correctly set
Trying to use rootObject before initialization is completed, whilst using setInitializationDelayed. Forcing completion
Invalid framesize.
No frame loaded
No frame loaded
No frame loaded
The file  "/home/rog131/.local/share/knewstuff3/lookandfeel.knsregistry"  could not be opened.
pluginname:  "ELplas"
The file  "/home/rog131/.local/share/knewstuff3/colorschemes.knsregistry"  could not be opened.
org.kde.knewstuff.core: Redirected to  "https://autoconfig.kde.org/ocs/providers.xml" ...
installing...
Could not determine type of archive file ' "/tmp/TJ1783-155884-ElementaryLuna.colors" '
QProcess: Destroyed while process ("/usr/lib/x86_64-linux-gnu/libexec/kf5/kpackagehandlers/knshandler") is still running.
The file  "/home/rog131/.local/share/knewstuff3/plasma-themes.knsregistry"  could not be opened.
org.kde.knewstuff.core: Redirected to  "https://autoconfig.kde.org/ocs/providers.xml" ...
installing...
pluginname:  "BreezeAlphaBlackNaked"
Successfully installed /tmp/1480033867-BreezeAlphaBlackNaked.tar.gz
The file  "/home/rog131/.local/share/knewstuff3/plasmoids.knsregistry"  could not be opened.
org.kde.knewstuff.core: Redirected to  "https://autoconfig.kde.org/ocs/providers.xml" ...
installing...
pluginname:  "org.kde.plasma.simplemenu"
Successfully installed /tmp/simplemenu-1.0.1.plasmoid
The file  "/home/rog131/.local/share/knewstuff3/aurorae.knsregistry"  could not be opened.
org.kde.knewstuff.core: Redirected to  "https://autoconfig.kde.org/ocs/providers.xml" ...
installing...
Successfully installed /tmp/ELplas.tar.gz

Tue Feb 21 11:29:01 2017
----------------



(*) clean = out of the box, no updates installed.

(**) Neon:
Plasma 5.9.1
KF 5.31
Qt 5.7.1
Kernel: 4.4.0-62-generic
User avatar Frederick888
Registered Member
Posts
12
Karma
1
Thanks @Rog131 for help. I finally ended with checking the source code on my own.

In "kpackage", src/kpackage/private/packagejobthread.cpp, we could see that the error comes from L375-382

Code: Select all
    for(const QString &dep : dependencies) {
        QUrl depUrl(dep);
        if (!installDependency(depUrl)) {
            d->errorMessage = i18n("Could not install dependency: '%1'", dep);
            d->errorCode = Package::JobError::PackageCopyError;
            return false;
        }
    }


Then in "installDependency", I added one line for debug
Code: Select all
diff --git a/src/kpackage/private/packagejobthread.cpp b/src/kpackage/private/packagejobthread.cpp
index 58cadfe..6812d12 100644
--- a/src/kpackage/private/packagejobthread.cpp
+++ b/src/kpackage/private/packagejobthread.cpp
@@ -198,8 +198,10 @@ static QString resolveHandler(const QString &scheme)
 bool PackageJobThread::installDependency(const QUrl &destUrl)
 {
     auto handler = resolveHandler(destUrl.scheme());
-    if (handler.isEmpty())
+    if (handler.isEmpty()) {
+        qWarning() << "Failed to find resolve handler for scheme: " << destUrl.scheme();
         return false;
+    }
 
     QProcess process;
     process.setProgram(handler);


And it turned out that it failed to find the resolver. However, I've got the file "/usr/lib/kf5/kpackagehandlers/knshandler" in my disk. So I just dug a little deeper:
Code: Select all
static QString resolveHandler(const QString &scheme)
{
    QString candidatePath = QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/kpackagehandlers/%1handler").arg(scheme);
    if (qEnvironmentVariableIsSet("KPACKAGE_DEP_RESOLVERS_PATH")) {
        candidatePath = QStringLiteral("%1/%2handler").arg(qgetenv("KPACKAGE_DEP_RESOLVERS_PATH"), scheme);
    }   
    return QFile::exists(candidatePath) ? candidatePath : QString();
}


There must be something wrong with the "candidatePath"! Therefore I tried linking /usr/lib/kf5 to /usr/lib/libexec/kf5 and the issue just went away, cheers!

I'd file an issue in Arch
User avatar Frederick888
Registered Member
Posts
12
Karma
1
Bennie267
Registered Member
Posts
1
Karma
0
A quick test with the Neon - the ELplas: https://store.kde.org/p/1169591/ - is installing fine.

Maybe a missing optional package ?

https://mobdro.io/

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], boospy007, ericjs, Google [Bot], Sogou [Bot], taha_mcp, Yahoo [Bot]