Menu

#25 pdfbooklet on Ubuntu21.1

Stable version
open
Averell
1
2024-04-09
2022-02-10
Anonymous
No

I am using...
LSB Version: core-11.1.0ubuntu3-noarch:security-11.1.0ubuntu3-noarch
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish

I have installed...
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-poppler-0.18
[sudo] password for fahim:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gir1.2-gtk-3.0 is already the newest version (3.24.30-1ubuntu1).
gir1.2-poppler-0.18 is already the newest version (21.06.1-1).
python3-gi is already the newest version (3.40.1-1build1).
python3-gi-cairo is already the newest version (3.40.1-1build1).
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.

However,
When I try installing.....pdfbooklet_3.1.2-2_all.deb

I get "unmet dependecies" error.

sudo apt-get install ~/Downloads/pdfbooklet_3.1.2-2_all.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'pdfbooklet' instead of '/home/fahim/Downloads/pdfbooklet_3.1.2-2_all.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
pdfbooklet : Depends: python-gi but it is not installable
Depends: python-gi-cairo but it is not installable
E: Unable to correct problems, you have held broken packages.

Then I try fixing borken packages with
sudo apt --fix-broken install

it removes pdfbooklet.. and I am back to square one.. help me out. Thanks.

Discussion

  • Anonymous

    Anonymous - 2022-02-10

    P.S.
    I also tried this..
    (base) fahim@fahim:~$ chmod +x ./pdfbooklet_3.1.2-2_all.deb
    chmod: cannot access './pdfbooklet_3.1.2-2_all.deb': No such file or directory
    (base) fahim@fahim:~$ chmod +x ~/Download/pdfbooklet_3.1.2-2_all.deb
    chmod: cannot access '/home/fahim/Download/pdfbooklet_3.1.2-2_all.deb': No such file or directory
    (base) fahim@fahim:~$ chmod +x ~/Downloads/pdfbooklet_3.1.2-2_all.deb
    (base) fahim@fahim-Inspiron-3583:~$ cd Downloads
    (base) fahim@fahim-Inspiron-3583:~/Downloads$ ./pdfbooklet_3.1.2-2_all.deb
    ./pdfbooklet_3.1.2-2_all.deb: line 1: syntax error near unexpected token newline' ./pdfbooklet_3.1.2-2_all.deb: line 1:!<arch>'</arch>

     
  • Averell

    Averell - 2022-02-10

    Hello, I understand...
    but as I said somewhere, we are developing in Windows, and we have not found someone to help us for the Linux version. This is regrettable because PdfBooklet should work in Linux, but this require a person to maintain the LInux version.

    Nevertheless, the problem is simple : the packets have changed name, they are now :
    python3-gi
    python3-gi-cairo
    I wonder if it is possible to install them with an alias, so that the deb file will not complain ?

    But I should be able to update the packet one day.

     

    Last edit: Averell 2022-02-10
  • Anonymous

    Anonymous - 2022-05-21

    I am a different person than the anonymous user above.

    I have both python3-gi and python3-gi-cairo, and can confirm that PdfBooklet does not work in Ubuntu 22.04 either. Running dpkg -I pdfbooklet_3.1.2-2_all.deb shows that python-gi and python-gi-cairo (which are not available in Ubuntu 21.10 or Ubuntu 22.04) are still dependencies of the current .deb file:

    Depends: python (>= 2.7), python-gi, python-gi-cairo, python3-gi, python3-gi-cairo, python3-cairo, gir1.2-gtk-3.0, gir1.2-poppler-0.18

    If those two dependencies could be removed, this would probably work in the newer version of Ubuntu. Unfortunately, I don't know how to do that. If I can figure that out, I will create a user account here and try to do that.

    I have downloaded the zip file from Github and trying python3 pdfbooklet3.py but that does not work, either.

    I will keep trying. There are other booklet-making apps out there, but they always want to force the output to a standard page size (A4 or letter, landscape), so if you want to do something different, such as creating a portrait size booklet, they end up cropping or scaling to fit, which is not good.

    I am watching this on Github (kjodle) and if I can figure something out, I will update you.

    Thanks,
    -Ken

     
  • Averell

    Averell - 2022-05-21

    Hello Ken,
    have a look at build.py in the Github repository. You will find inside the code I was using previously (using alien) to define the dependencies. I was surprised it was so difficult to find a way to build a Debian package.
    The code is commented because I had problems similar to yours, and I abandoned. If you manage to create an installable package, tell me. You can join this project, if you want.

     
  • kjodle

    kjodle - 2022-06-06

    Hello Averell,

    It's me, Ken.

    I have managed to create a .deb file that works in Ubuntu 22.04, by updating the control file in the .deb package, and rebuilding it.

    I'm not sure of the next step.

    Thanks,
    -Ken

     
  • Anonymous

    Anonymous - 2022-09-18

    Found this link about how to fix the deb package:
    https://unix.stackexchange.com/questions/138188/easily-unpack-deb-edit-postinst-and-repack-deb

    The primary command to manipulate deb packages is dpkg-deb.

    To unpack the package, create an empty directory and switch to it, then run dpkg-deb to extract its control information and the package files. Use dpkg-deb -b to rebuild the package.

    mkdir tmp
    dpkg-deb -R original.deb tmp
    #edit the DEBIAN/postinst file to remove python-gi and python-gi-cairo as dependencies
    dpkg-deb -b tmp fixed.deb

    Beware that unless your script is running as root, the files' permissions and ownership will be corrupted at the extraction stage.

    Running Debian bullseye 11 here.

     
  • Anonymous

    Anonymous - 2024-02-28

    I solved the problem on Ubuntu 22.04 in this way:
    unzip the file.tar.tgz ----->
    the "pdfbooklet-3.1.2-all_64" folder will be created

    • copy exactly everything found in this folder
      (in the same directories) in the directory located in:
      /usr....and subdirectories
      P.S.: it is only possible with ROOT privileges

    then, via synaptic from root, install the poppler libraries (0.18)
    because otherwise the program will not start

    • at the end, from the terminal, type the command:
      "pdfbooklet"
     
  • Averell

    Averell - 2024-02-28

    Hello
    thanks a lot for the solution. Your post reminded me that I must try to fix this .deb. I think I have a friend who will be able to help.

     
  • Anonymous

    Anonymous - 2024-04-09

    Hi, Have you solved the .deb file yet? I have fixed it so that it will work with Python 3 on Linux Mint 21.3. I am super happy to send it to whomever so that it works

     
  • Averell

    Averell - 2024-04-09

    No, I had not and I am very interested by your work to make it available.
    Probably the most simple solution is to send by wetransfer and post the link here.
    Or would you like to become participant of the project ?

     

Anonymous
Anonymous

Add attachments
Cancel