Keruspe / GPaste

Clipboard management system
BSD 2-Clause "Simplified" License
756 stars 54 forks source link

start up failed on ubuntu 22.04 LTS #396

Open wen-zheng opened 2 years ago

wen-zheng commented 2 years ago

Error: Requiring GPasteGtk, version 4: Typelib file for namespace 'GPasteGtk', version '4' not found

Stack trace: @/usr/local/share/gnome-shell/extensions/GPaste@gnome-shell-extensions.gnome.org/prefs.js:11:23 _init@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:23:33 ExtensionPrefsDialog@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:10:4 OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:129:33 asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22 run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:186:20 main@resource:///org/gnome/Shell/Extensions/js/main.js:22:13 run@resource:///org/gnome/gjs/modules/script/package.js:206:19 start@resource:///org/gnome/gjs/modules/script/package.js:190:8 @/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

wen-zheng commented 2 years ago

I build gpaste manually, and installed successfully, but gpate cannot start and reports above messages

mwt commented 2 years ago

I also can't make it work. I'm not sure it's the same issue.

strace: gpaste-client.log build-log: meson-log.txt

ipeacocks commented 2 years ago

Mine GPaste 42.1 is working but shows the same error in gnome-extension enable window: image image

ipeacocks commented 2 years ago

That's why gnome-extension isn't working and hotkeys too.

igorpupkinable commented 1 year ago

Is it possible to publish this for Ubuntu 22.04 Extension Manager? Unfortunately, it does not appear in search results at all.

image

jtojnar commented 1 year ago

The extension depends on a binary daemon so if you are unable to build it, installing just the extension from web store would not help you. I would recommend you to install GPaste through your distribution’s package manager.

Totto16 commented 1 year ago

The problem also occured to me, after some digging I foudn out the following:

The typelib for "GpasteGtk" version "4" cannot be found, since it's in a wrong folder.

To fix this, navigate to the folder where they were installed, to see that folder, look at the "sudo meson install" output, for me it was /usr/local/lib/x86_64-linux-gnu/girepository-1.0/

Than to get the folders, that are correct do the follwoing:

gjs-console
gjs> const GIRepository = imports.gi.GIRepository;
gjs> log (GIRepository.Repository.get_search_path());

For me the output was ["/usr/lib/x86_64-linux-gnu/gjs/girepository-1.0", "/usr/lib/x86_64-linux-gnu/girepository-1.0", "/usr/lib/girepository-1.0"]

Than finally copy the the files from the first folder to one of the valid ones, than restart the gnome-shell session (log-out, reboot or other)

This worked for me on Ubuntu 22.10

jtojnar commented 1 year ago

You can run meson setup --prefix=/usr to change the installation directory. Or meson configure --prefix=/usr if you already have the project set up.

Though I would seriously recommend against installing packages to your system manually and rely on your package manager instead. Manual installation will just end up with a mess on your file system unless you are very careful. Speaking from experience :wink: