RajSolai / TextSnatcher

How to Copy Text from Images ? Answer is TextSnatcher !. Perform OCR operations in seconds on Linux Desktop.
https://textsnatcher.rf.gd/
GNU General Public License v3.0
1.26k stars 45 forks source link

error: Package `libportal' not found in specified Vala API directories or GObject-Introspection GIR directories #40

Closed estatistics closed 1 year ago

estatistics commented 1 year ago

Linux bullseye 11 with kde. i have installed the related dev packages, but ...

[1/16] Compiling Vala source ../src/Application.vala ../src/MainWindow.va..../src/services/LanguageService.vala ../src/services/TesseractTrigger.vala
FAILED: com.github.rajsolai.textsnatcher.p/src/Application.c com.github.rajsolai.textsnatcher.p/src/MainWindow.c com.github.rajsolai.textsnatcher.p/src/components/VerticalBox.c com.github.rajsolai.textsnatcher.p/src/components/HeaderBar.c com.github.rajsolai.textsnatcher.p/src/components/LanguageButton.c com.github.rajsolai.textsnatcher.p/src/components/AboutButton.c com.github.rajsolai.textsnatcher.p/src/components/AboutDialog.c com.github.rajsolai.textsnatcher.p/src/components/SelectPictureDialog.c com.github.rajsolai.textsnatcher.p/src/screens/MainScreen.c com.github.rajsolai.textsnatcher.p/src/screens/HomeScreen.c com.github.rajsolai.textsnatcher.p/src/screens/SelectPictureScreen.c com.github.rajsolai.textsnatcher.p/src/services/LanguageService.c com.github.rajsolai.textsnatcher.p/src/services/TesseractTrigger.c 
valac -C --debug --debug --pkg gtk+-3.0 --pkg glib-2.0 --pkg gdk-pixbuf-2.0 --pkg libportal --pkg libhandy-1 --pkg gobject-2.0 --pkg granite --color=always --directory com.github.rajsolai.textsnatcher.p --basedir ../ --gresources=../data/com.github.rajsolai.textsnatcher.gresource.xml ../src/Application.vala ../src/MainWindow.vala ../src/components/VerticalBox.vala ../src/components/HeaderBar.vala ../src/components/LanguageButton.vala ../src/components/AboutButton.vala ../src/components/AboutDialog.vala ../src/components/SelectPictureDialog.vala ../src/screens/MainScreen.vala ../src/screens/HomeScreen.vala ../src/screens/SelectPictureScreen.vala ../src/services/LanguageService.vala ../src/services/TesseractTrigger.vala
error: Package `libportal' not found in specified Vala API directories or GObject-Introspection GIR directories
Compilation failed: 1 error(s), 0 warning(s)
ninja: build stopped: subcommand failed.
 LANGUAGE=EN; sudo apt install libportal*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libportal-dev' for glob 'libportal*'
Note, selecting 'libportal-doc' for glob 'libportal*'
Note, selecting 'libportal-tests' for glob 'libportal*'
Note, selecting 'libportal0' for glob 'libportal*'
libportal-dev is already the newest version (0.3+git20200327-1).
libportal-doc is already the newest version (0.3+git20200327-1).
libportal-tests is already the newest version (0.3+git20200327-1).
libportal0 is already the newest version (0.3+git20200327-1).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.

but... libportal dont exists here...

elias@eliasc:~/Downloads/_LINUX_PKGS/textsnatcher/TextSnatcher$ l /usr/share/vala/vapi/ 
Dbusmenu-0.4.vapi      fsoresource-2.0.vapi   gcalc-2.vapi         gsm0710mux-1.0.vapi     libnm.deps                   librsvg-2.0.vapi
fsobasics-2.0.deps     fsosystem-2.0.deps     gci-1.deps           gtksourceview-3.0.deps  libnm.vapi                   packagekit-glib2.deps
fsobasics-2.0.vapi     fsosystem-2.0.vapi     gci-1.vapi           gtksourceview-3.0.vapi  libpulse.deps                packagekit-glib2.vapi
fsoframework-2.0.deps  fsotest-2.0.deps       gee-0.8.vapi         ibus-1.0.deps           libpulse-mainloop-glib.deps  xapp.deps
fsoframework-2.0.vapi  fsotest-2.0.vapi       granite.deps         ibus-1.0.vapi           libpulse-mainloop-glib.vapi  xapp.vapi
fso-glib-1.0.deps      fsotransport-2.0.deps  granite.vapi         libcanberra.vapi        libpulse-simple.deps
fso-glib-1.0.vapi      fsotransport-2.0.vapi  gsm0710-1.0.vapi     libhandy-1.deps         libpulse-simple.vapi
fsoresource-2.0.deps   gcalc-2.deps           gsm0710mux-1.0.deps  libhandy-1.vapi         libpulse.vapi

but...


ldconfig -p | grep libportal
    libportal.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libportal.so.0
    libportal.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libportal.so
estatistics commented 1 year ago

solved: i found the packages online (0.6.3 for ubuntu). I had problems to install some of them (cause ubuntu dont supprot deb packages zipped with zst algorithm). Whenever I met that error, i did the following:

mkdir deb-temp; cd deb-temp
ar x ../gir1.2-xdp-1.0_0.6-3_amd64.deb
zstd -d *.zst; rm *.zst; xz *.tar
ar r ../gir1.2-xdp-1.0_0.6-3_amd64_XZ.deb debian-binary control.tar.xz data.tar.xz

These packages I needed to install (manually)

sudo apt install ./gir1.2-xdp-1.0_0.6-3_amd64.deb
sudo apt install ./libportal1_0.6-3_amd64.deb

and then: sudo apt install ./libportal-dev_0.6-3_amd64.deb

and voila!

estatistics commented 1 year ago

here it is... l /usr/share/vala/vapi/


Dbusmenu-0.4.vapi      fsoresource-2.0.vapi   gcalc-2.vapi         gsm0710mux-1.0.vapi     libnm.deps                   libpulse-simple.vapi
fsobasics-2.0.deps     fsosystem-2.0.deps     gci-1.deps           gtksourceview-3.0.deps  libnm.vapi                   libpulse.vapi
fsobasics-2.0.vapi     fsosystem-2.0.vapi     gci-1.vapi           gtksourceview-3.0.vapi  libportal.deps               librsvg-2.0.vapi
fsoframework-2.0.deps  fsotest-2.0.deps       gee-0.8.vapi         ibus-1.0.deps           libportal.vapi               packagekit-glib2.deps
fsoframework-2.0.vapi  fsotest-2.0.vapi       granite.deps         ibus-1.0.vapi           libpulse.deps                packagekit-glib2.vapi
fso-glib-1.0.deps      fsotransport-2.0.deps  granite.vapi         libcanberra.vapi        libpulse-mainloop-glib.deps  xapp.deps
fso-glib-1.0.vapi      fsotransport-2.0.vapi  gsm0710-1.0.vapi     libhandy-1.deps         libpulse-mainloop-glib.vapi  xapp.vapi
fsoresource-2.0.deps   gcalc-2.deps           gsm0710mux-1.0.deps  libhandy-1.vapi         libpulse-simple.deps