ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.65k stars 312 forks source link

Install appears to fail in Deb-Trixie but package seems to have installed? #1400

Open atorrey opened 8 months ago

atorrey commented 8 months ago

This issue is unique.

Operating System

Linux (DEB package)

Version information

7.5.0-127

Expected Behavior

No previous use of OO, expected successful install w/o errors.

Actual Behavior

Install failed - Processing triggers for libc-bin (2.37-12) ... Processing triggers for man-db (2.11.2-3) ... Processing triggers for mailcap (3.70+nmu1) ... Errors were encountered while processing: onlyoffice-desktopeditors onlyoffice-desktopeditors-help E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up onlyoffice-desktopeditors (7.5.0-127) ... /var/lib/dpkg/info/onlyoffice-desktopeditors.postinst: 26: update-desktop-database: not found dpkg: error processing package onlyoffice-desktopeditors (--configure): installed onlyoffice-desktopeditors package post-installation script subprocess returned error exit status 127 dpkg: dependency problems prevent configuration of onlyoffice-desktopeditors-help: onlyoffice-desktopeditors-help depends on onlyoffice-desktopeditors; however: Package onlyoffice-desktopeditors is not configured yet.

dpkg: error processing package onlyoffice-desktopeditors-help (--configure): dependency problems - leaving unconfigured Processing triggers for libc-bin (2.37-12) ... Errors were encountered while processing: onlyoffice-desktopeditors onlyoffice-desktopeditors-help

Did complete removal of both packages, attempted again w/ just OO desktop

Install failed: Selecting previously unselected package onlyoffice-desktopeditors. (Reading database ... 326086 files and directories currently installed.) Preparing to unpack .../onlyoffice-desktopeditors_7.5.0-127_amd64.deb ... Unpacking onlyoffice-desktopeditors (7.5.0-127) ... Setting up onlyoffice-desktopeditors (7.5.0-127) ... /var/lib/dpkg/info/onlyoffice-desktopeditors.postinst: 26: update-desktop-database: not found dpkg: error processing package onlyoffice-desktopeditors (--configure): installed onlyoffice-desktopeditors package post-installation script subprocess returned error exit status 127 Processing triggers for gnome-menus (3.36.0-1.1) ... Processing triggers for libc-bin (2.37-12) ... Processing triggers for mailcap (3.70+nmu1) ... Errors were encountered while processing: onlyoffice-desktopeditors E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up onlyoffice-desktopeditors (7.5.0-127) ... /var/lib/dpkg/info/onlyoffice-desktopeditors.postinst: 26: update-desktop-database: not found dpkg: error processing package onlyoffice-desktopeditors (--configure): installed onlyoffice-desktopeditors package post-installation script subprocess returned error exit status 127 Processing triggers for libc-bin (2.37-12) ... Errors were encountered while processing: onlyoffice-desktopeditors

However when I went to the KDE start menu, I had an OO entry in the Office section. Clicking it opens the program, and it seems to work in a minimal test (creating and saving an ODT doc which I then opened w/ Libre Office successfully)

Reproduction Steps

Install repository per https://helpcenter.onlyoffice.com/installation/desktop-install-ubuntu.aspx Add GPG key:

mkdir -p -m 700 ~/.gnupg gpg --no-default-keyring --keyring gnupg-ring:/tmp/onlyoffice.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 chmod 644 /tmp/onlyoffice.gpg sudo chown root:root /tmp/onlyoffice.gpg sudo mv /tmp/onlyoffice.gpg /usr/share/keyrings/onlyoffice.gpg

Add desktop editors repository:

echo 'deb [signed-by=/usr/share/keyrings/onlyoffice.gpg] https://download.onlyoffice.com/repo/debian squeeze main' | sudo tee -a /etc/apt/sources.list.d/onlyoffice.list

While the APT package is built against Debian Squeeze, it is compatible with a number of Debian derivatives (including Ubuntu) which means you can use the same repository across all these distributions.

Open synaptic (apt front end, does same things) Select OO and mark suggested dependencies attempt to apply, get errors above...

Additional information

Per Info Center - this is system if it matters: Operating System: Debian GNU/Linux 12 KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.107.0 Qt Version: 5.15.10 Kernel Version: 6.5.0-1-amd64 (64-bit) Graphics Platform: Wayland Processors: 12 × Intel® Core™ i7-3930K CPU @ 3.20GHz Memory: 47.0 GiB of RAM Graphics Processor: NV92 Manufacturer: Dedicated Computing Product Name: OEM-S4040-00

the4anoni commented 8 months ago

I am having exact same issue on clean Debian 12 Bookworm with KDE installation on my laptop.

filip@Pavilion-Laptop:~$ sudo apt-get install onlyoffice-desktopeditors
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności... Gotowe
Odczyt informacji o stanie... Gotowe   
Zostaną zainstalowane następujące NOWE pakiety:
  onlyoffice-desktopeditors
0 aktualizowanych, 1 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
Konieczne pobranie 0 B/246 MB archiwów.
Po tej operacji zostanie dodatkowo użyte 994 MB miejsca na dysku.
Wybieranie wcześniej niewybranego pakietu onlyoffice-desktopeditors.
(Odczytywanie bazy danych ... 149818 plików i katalogów obecnie zainstalowanych.)
Przygotowywanie do rozpakowania pakietu .../onlyoffice-desktopeditors_7.5.0-127_amd64.deb ...
Rozpakowywanie pakietu onlyoffice-desktopeditors (7.5.0-127) ...
Konfigurowanie pakietu onlyoffice-desktopeditors (7.5.0-127) ...
/var/lib/dpkg/info/onlyoffice-desktopeditors.postinst: 26: update-desktop-database: not found
dpkg: błąd przetwarzania pakietu onlyoffice-desktopeditors (--configure):
 podproces zainstalowany pakiet onlyoffice-desktopeditors skrypt post-installation zwrócił kod błędu 127
Przetwarzanie wyzwalaczy pakietu libc-bin (2.36-9+deb12u3)...
Przetwarzanie wyzwalaczy pakietu mailcap (3.70+nmu1)...
Wystąpiły błędy podczas przetwarzania:
 onlyoffice-desktopeditors
E: Sub-process /usr/bin/dpkg returned an error code (1)
filip@Pavilion-Laptop:~$ uname -a
Linux Pavilion-Laptop 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux
filip@Pavilion-Laptop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
filip@Pavilion-Laptop:~$ 
Ewan67 commented 8 months ago

Same issue updating OO via apt upgrade -y from version 7.4.1-36

OO works fine as far as I have been able to check

# apt update -y
Hit:2 https://download.onlyoffice.com/repo/debian squeeze InRelease 
...
Setting up onlyoffice-desktopeditors (7.5.0-127) ...
/var/lib/dpkg/info/onlyoffice-desktopeditors.postinst: 26: update-desktop-database: not found
dpkg: error processing package onlyoffice-desktopeditors (--configure):
 installed onlyoffice-desktopeditors package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 onlyoffice-desktopeditors
E: Sub-process /usr/bin/dpkg returned an error code (1)

# uname -a                                       
Linux kali 6.5.0-kali3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.6-1kali1 (2023-10-09) x86_64 GNU/Linux

# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2023.3
Codename:       kali-rolling

# apt policy onlyoffice-desktopeditors
onlyoffice-desktopeditors:
  Installed: 7.5.0-127
  Candidate: 7.5.0-127
  Version table:
 *** 7.5.0-127 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
        100 /var/lib/dpkg/status
     7.4.1-36 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.4.0-163 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.3.3-50~stretch 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.3.0-184~stretch 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.2.1-36 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.2.0-204 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.1.1-57 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.1.0-215 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.0.2-5 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.0.1-37 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     7.0.0-127 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     6.4.2-6 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     6.4.1-46 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     6.3.1-56 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     6.2.0-148 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     6.1.0-90 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     6.0.2-10 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     6.0.1-32 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
     6.0.0-110 500
        500 https://download.onlyoffice.com/repo/debian squeeze/main amd64 Packages
atorrey commented 8 months ago

I've only tried creating / editing a couple of documents in the Writer, (saving as 8.odt's) but have not encountered any functional problems.

However, every time I install upgrades, using synaptic, it attempts to set it up again and I get an error on OO.... Going into the details of the failure, I get the following OO related error messages....

Extracting templates from packages: 100%
Preconfiguring packages ...
setting xserver-xorg-legacy/xwrapper/allowed_users from configuration file
(Reading database ... 337664 files and directories currently installed.)

other program stuff (a lot of preparing to unpack / unpacking sequences, I did NOT see OO) then

Setting up onlyoffice-desktopeditors (7.5.0-127) ...
/var/lib/dpkg/info/onlyoffice-desktopeditors.postinst: 26: update-desktop-database: not found
dpkg: error processing package onlyoffice-desktopeditors (--configure):
 installed onlyoffice-desktopeditors package post-installation script subprocess returned error exit status 127

other program stuff (a lot of setting up and processing triggers, I did NOT see OO) then

Errors were encountered while processing:
 onlyoffice-desktopeditors
A package failed to install.  Trying to recover:
Setting up onlyoffice-desktopeditors (7.5.0-127) ...
/var/lib/dpkg/info/onlyoffice-desktopeditors.postinst: 26: update-desktop-database: not found
dpkg: error processing package onlyoffice-desktopeditors (--configure):
 installed onlyoffice-desktopeditors package post-installation script subprocess returned error exit status 127
Processing triggers for libc-bin (2.37-12) ...
Errors were encountered while processing:
 onlyoffice-desktopeditors

A bit more digging based on the error that looks like it might be the problem... /var/lib/dpkg/info/onlyoffice-desktopeditors.postinst: 26: update-desktop-database: not found

I found /var/lib/dpkg/info/onlyoffice-desktopeditors.postinst - it is a bash script.... Near the end of it (possibly line 26?) it says

update-mime-database /usr/share/mime
update-desktop-database /usr/share/applications

# Update cache of .desktop file MIME types. Non-fatal since it's just a cache.
#update-desktop-database > /dev/null 2>&1 || true

# ls /usr/share/applications |grep only finds the file onlyoffice-desktopeditors.desktop

BUT if I try running the command by itself - # update-desktop-database /usr/share/applications bash: update-desktop-database: command not found (emphasis added....)

Could this be the bug????

CorentinChoisy commented 7 months ago

Fixed on Debian 12 by installing the desktop-file-utils package, which provides the update-desktop-database command.

Ewan67 commented 7 months ago

Worked for me

# apt update -y
...
Hit:2 https://download.onlyoffice.com/repo/debian squeeze InRelease                                                                                                  
...
44 packages can be upgraded. Run 'apt list --upgradable' to see them.

# apt upgrade -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
...
Setting up onlyoffice-desktopeditors (7.5.1-23) ...
/var/lib/dpkg/info/onlyoffice-desktopeditors.postinst: 26: update-desktop-database: not found
dpkg: error processing package onlyoffice-desktopeditors (--configure):
 installed onlyoffice-desktopeditors package post-installation script subprocess returned error exit status 127
...
Errors were encountered while processing:
 onlyoffice-desktopeditors
E: Sub-process /usr/bin/dpkg returned an error code (1)

# apt policy desktop-file-utils
desktop-file-utils:
  Installed: (none)
  Candidate: 0.26-1
  Version table:
     0.26-1 500
        500 https://http.kali.org/kali kali-rolling/main amd64 Packages

# apt install desktop-file-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
...
The following NEW packages will be installed:
  desktop-file-utils
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 91.2 kB of archives.
After this operation, 292 kB of additional disk space will be used.
Get:1 https://kali.download/kali kali-rolling/main amd64 desktop-file-utils amd64 0.26-1 [91.2 kB]
Fetched 91.2 kB in 1s (81.9 kB/s)             
Selecting previously unselected package desktop-file-utils.
(Reading database ... 482704 files and directories currently installed.)
Preparing to unpack .../desktop-file-utils_0.26-1_amd64.deb ...
Unpacking desktop-file-utils (0.26-1) ...
Setting up desktop-file-utils (0.26-1) ...
Setting up onlyoffice-desktopeditors (7.5.1-23) ...
Processing triggers for kali-menu (2023.4.5) ...
Processing triggers for man-db (2.12.0-1) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for libc-bin (2.37-12) ...

Thank you very much @CorentinChoisy

matveevms commented 7 months ago

Hello, @atorrey! I created ticket #65175 with your problem. For a workaround, you can try using the solution from https://github.com/ONLYOFFICE/DesktopEditors/issues/1400#issuecomment-1814744847 Thanks for your request!

atorrey commented 7 months ago

Thanks @CorentinChoisy, adding that package seems to have gotten rid of the error message. Thanks @matveevms for confirming the bug and creating the ticket... Hopefully the fix will be an easy one - presumably either making the package a dependency, or a test that stops the script from running the command if it doesn't exist... (Since the program installs OK otherwise, it seems that not having that task run isn't a big problem....) ART