Stirling PDF Installation

For the love of god. Can someone please help me to install Stirling PDF. I've tried everything. Tried Docker, Dockge and including the below optinons:

https://docs.stirlingpdf.com/Installation/Unix%20Installation/

https://forums.linuxmint.com/viewtopic.php?t=433911

Nothing works at all. These are the logs from my three terminals today.

What on earth am I doing wrong here?

admin@user10-ThinkPad-P15-Gen-1:<del>$ sudo systemctl enable docker

[sudo] password for admin:
Synchronizing state of docker.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable docker
admin@user10-ThinkPad-P15-Gen-1:$ sudo docker version
Client: Docker Engine - Community
Version: 27.5.1
API version: 1.47
Go version: go1.22.11
Git commit: 9f9e405
Built: Wed Jan 22 13:41:48 2025
OS/Arch: linux/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 27.5.1
API version: 1.47 (minimum version 1.24)
Go version: go1.22.11
Git commit: 4c9b3b0
Built: Wed Jan 22 13:41:48 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.25
GitCommit: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
runc:
Version: 1.2.4
GitCommit: v1.2.4-0-g6c52b3f
docker-init:
Version: 0.19.0
GitCommit: de40ad0

admin@user10-ThinkPad-P15-Gen-1:<del>$ sudo apt update

Hit:1 Index of /ubuntu noble-security InRelease
Hit:2 Index of /ubuntu noble InRelease
Ign:3 http://packages.linuxmint.com xia InRelease
Hit:4 Index of /debian/ stable InRelease
Ign:5 Index of /stable/deb/ stable InRelease
Hit:6 Index of /stable/deb/ stable Release
Hit:7 Index of /ubuntu noble-updates InRelease
Hit:8 http://packages.linuxmint.com xia Release
Ign:9 Index of linux/ubuntu/ xia InRelease
Hit:10 Index of /ubuntu noble-backports InRelease
Hit:11 Index of /wine-builds/ubuntu noble InRelease
Hit:12 Index of http://download.virtualbox.org/virtualbox/debian noble InRelease
Err:14 Index of linux/ubuntu/ xia Release
404 Not Found [IP: 13.227.219.51 443]
Hit:16 Index of /deb/stable/ noble InRelease
Reading package lists... Done
E: The repository 'Index of linux/ubuntu/ xia Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

admin@user10-ThinkPad-P15-Gen-1:</del>$ sudo apt upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
linux-headers-6.8.0-51 linux-tools-6.8.0-51
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

admin@user10-ThinkPad-P15-Gen-1:<del>$ docker pull stirlingtools/stirling-pdf:latest

permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.47/images/create?fromImage=stirlingtools%2Fstirling-pdf&tag=latest": dial unix /var/run/docker.sock: connect: permission denied

admin@user10-ThinkPad-P15-Gen-1:</del>$ mkdir -p <del>/StirlingPDF/{trainingData,extraConfigs,customFiles,logs,pipeline}
admin@user10-ThinkPad-P15-Gen-1:</del>$ docker run -d
--name stirling-pdf
-p 8080:8080
-v ~/StirlingPDF/trainingData:/usr/share/tessdata
-v ~/StirlingPDF/extraConfigs:/configs
-v <del>/StirlingPDF/customFiles:/customFiles/
-v <del>/StirlingPDF/logs:/logs/
-v <del>/StirlingPDF/pipeline:/pipeline/
-e DOCKER_ENABLE_SECURITY=false
-e LANGS=en_GB
stirlingtools/stirling-pdf:latest

docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.

Hi, I've edited your post to add some formatting, and removed a few of the redundant attempts.

You were actually pretty close, at least as far as I can tell since I've never used Stirling PDF myself. The issue here is with how group permissions work... you need to restart the computer for changes to take effect. After that, you can resume at this command:

docker run -d \
  --name stirling-pdf \
  -p 8080:8080 \
  -v "./StirlingPDF/trainingData:/usr/share/tessdata" \
  -v "./StirlingPDF/extraConfigs:/configs" \
  -v "./StirlingPDF/customFiles:/customFiles/" \
  -v "./StirlingPDF/logs:/logs/" \
  -v "./StirlingPDF/pipeline:/pipeline/" \
  -e DOCKER_ENABLE_SECURITY=false \
  -e LANGS=en_GB \
  stirlingtools/stirling-pdf:latest

Are You on Linux Mint 22 or why do You have these noble and xia Repo's?

1 Like

His profile indicates Core. That is why the noble repo needs replacing with Jammy.
From their official website you need to use java.jar as no Linux installer available yet.

"2. 1. Linux/Unix Users

  • Dedicated Linux installer to be released soon, Currently you must run Stirling-PDF as a java jar
  • Follow our comprehensive Unix Installation Guide for a native installation."

Personally I much prefer pdf Studio Pro.

1 Like

Hi, many thanks for your response and for editing the post!

I'm not going to pretend like I came up with all that myself. Not at all. Im a total linux beginner. I just copy pasted it from online resources.

At the risk of being spoonfed, might you be able to provide the step by step commands and instructions (ie when to restart computer). I'm afraid I don't really know where I need to do that.

many thanks again

PDF Studio Pro? Is that a free software?

I haven't been able to find it.

Is it on flathub?

Stirling is pretty useful I have to say, but it is just irritating for beginners that it isn't an installable app like other software.

It's not free but you get all you need for a fifth of what Adobe Acrobat charge.

Maybe he/she uses Mint with Zorin as Dual-Boot and wrotes this from Mint. That is the Reason for asking.

This doesn't look like an easy installation. Lots of dependencies, lots of steps... I think using Docker is going to be much easier, and in that case it doesn't matter the underlying OS as long as Docker is installed.


docker pull stirlingtools/stirling-pdf:latest

Does this work now, after restarting?

Do you mean if I restart now and try that command it should work?

admin@user10-ThinkPad-P15-Gen-1:~$ docker pull stirlingtools/stirling-pdf:latest
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.47/images/create?fromImage=stirlingtools%2Fstirling-pdf&tag=latest": dial unix /var/run/docker.sock: connect: permission denied

Did you already run this?

sudo usermod -aG docker zenzen

Make sure to change "zenzen" here with your own username. Do not use the $USER variable, type your username. Then, restart, and try again.

just tried it. nothing happens. asked for password. entered. then nothing?

That's a good sign. After restart, try to run that docker pull ... command. Hopefully it should work now. I'm on my way out but I'll reply later.

Sorry, is this the docker pull I need to run after restart?

sudo usermod -aG docker admin

If so, same result as before. password, enter. nothing

Yes, I will confess that I am running Linux Mint. When I first moved to linux I started out on Zorin OS and in my exploration of distros I tried Ubuntu and now mint. However, I found the Zorin community to be the most inviting and helpful and so I now plan to return to Zorin but I haven't had the time to make the full switch and probably won't for some time as I need my system to be stable for the near future as there are some major things that I need to be working on and don't have time to troubleshoot a new system. Right now as a minimum I need this damn PDF tool to work.

So sorry for not understanding that the different Ubuntu based distros require different commands / code. I really am still very much a linux beginner.

1 Like

In regards to Linux versions, remember that Zorin OS is based on Ubuntu 22.04, even though the latest Ubuntu version is already at 24.04. I'm not sure about Mint, but I think it already uses Ubuntu 24.04.
When installing software for Linux, there are usually multiple set of instructions based on the distribution and/or version, and sometimes also the CPU architecture that you are running. So, just keep an eye for that since it's easy to miss and can cause a lot of frustration.

What Docker does is create a "miniature virtual machine" of sorts, and so the underlying operating system won't make much of a difference.

Let's start from the beginning and uninstall Docker:

sudo apt purge docker

And make sure it's uninstalled with this command, which should return as "command not found", or something similar.

docker --version

Next, run the following commands in a terminal window; these are taken directly from the Docker documentation page, which I link here for reference:

  1. This will add the repositories needed to install Docker. This is separate from the official repositories provided by Zorin OS (or in this case Mint) which will generally be more up to date. For something like Docker, I'd recommend using this method.

    # Add Docker's official GPG key:
    sudo apt-get update
    sudo apt-get install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    
    # Add the repository to Apt sources:
    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
      $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
      sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
    ```   ```sh
    # Add Docker's official GPG key:
    sudo apt-get update
    sudo apt-get install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    
    # Add the repository to Apt sources:
    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
      $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
      sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
    
  2. Install Docker:

    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    
  3. Assign group permissions:

    sudo usermod -aG docker $USER
    
  4. Enable the Docker service so that it starts automatically on boot:

    sudo systemctl enable docker
    
  5. Restart to apply the changes on user groups membership. Run the groups command to verify that you are indeed part of the "docker" group:

    groups
    

    And try to pull (download) the image Stirling PDF:

    docker pull stirlingtools/stirling-pdf:latest
    

That will take a while depending on your connection speed... but it should work now. From there, you can now refer to the command on the StirlingPDF website to run Docker. Note that they expect you to have certain folders created already (StrilingPDF/trainingData, extraConfigs, etc...). If you don't have them, you can create them in one command:

mkdir -p StirlingPDF/{trainingData,extraConfigs,customFiles,logs,pipeline}

I'm unfortunately out of time to wait for the download and test if it works but if the command to download the image runs, then you should be in good shape. Good luck!

2 Likes

Yes, the new Linux Mint 22 uses Ubuntu 24.04 LTS as Base.

2 Likes

wow. thanks so much! that's really generous of you to run me through that. I think its a pretty good tool so hopefully others will benefit from this run through.

I tried the steps laid out but I wasn't successful unfortunately. I tried to run it from the website with this command and then went to localhost:8080 and it didn't work.

docker run -d
--name stirling-pdf
-p 8080:8080
-v "./StirlingPDF/trainingData:/usr/share/tessdata"
-v "./StirlingPDF/extraConfigs:/configs"
-v "./StirlingPDF/customFiles:/customFiles/"
-v "./StirlingPDF/logs:/logs/"
-v "./StirlingPDF/pipeline:/pipeline/"
-e DOCKER_ENABLE_SECURITY=false
-e LANGS=en_GB
stirlingtools/stirling-pdf:latest

This is my terminal history:

admin@user10-ThinkPad-P15-Gen-1:~$ sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
[sudo] password for admin:
Hit:1 Index of /ubuntu noble InRelease
Hit:2 Index of /ubuntu noble-security InRelease
Hit:3 Index of /ubuntu noble-updates InRelease
Hit:4 Index of /ubuntu noble-backports InRelease
Hit:5 Index of http://download.virtualbox.org/virtualbox/debian noble InRelease
Hit:6 Index of /wine-builds/ubuntu noble InRelease
Hit:7 Index of linux/ubuntu/ noble InRelease
Ign:8 Index of /stable/deb/ stable InRelease
Hit:9 Index of /debian/ stable InRelease
Hit:10 Index of /stable/deb/ stable Release
Hit:11 Index of /deb/stable/ noble InRelease
Ign:12 http://packages.linuxmint.com xia InRelease
Hit:13 http://packages.linuxmint.com xia Release
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20240203).
curl is already the newest version (8.5.0-2ubuntu10.6).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
admin@user10-ThinkPad-P15-Gen-1:~$ echo
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] Index of linux/ubuntu/
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sh
Hit:1 Index of /ubuntu noble InRelease
Hit:2 Index of /ubuntu noble-updates InRelease
Hit:3 Index of /ubuntu noble-backports InRelease
Hit:4 Index of linux/ubuntu/ noble InRelease
Hit:5 Index of http://download.virtualbox.org/virtualbox/debian noble InRelease
Hit:6 Index of /wine-builds/ubuntu noble InRelease
Hit:7 Index of /ubuntu noble-security InRelease
Hit:8 Index of /debian/ stable InRelease
Ign:9 Index of /stable/deb/ stable InRelease
Hit:10 Index of /stable/deb/ stable Release
Ign:11 http://packages.linuxmint.com xia InRelease
Hit:12 Index of /deb/stable/ noble InRelease
Hit:13 http://packages.linuxmint.com xia Release
Reading package lists... Done
$ sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
Hit:1 Index of /ubuntu noble InRelease
Hit:2 Index of /ubuntu noble-security InRelease
Hit:3 Index of /ubuntu noble-updates InRelease
Hit:4 Index of /ubuntu noble-backports InRelease
Hit:5 Index of linux/ubuntu/ noble InRelease
Hit:6 Index of /wine-builds/ubuntu noble InRelease
Hit:7 Index of http://download.virtualbox.org/virtualbox/debian noble InRelease
Hit:8 Index of /debian/ stable InRelease
Ign:9 Index of /stable/deb/ stable InRelease
Ign:10 http://packages.linuxmint.com xia InRelease
Hit:11 Index of /stable/deb/ stable Release
Hit:12 Index of /deb/stable/ noble InRelease
Hit:13 http://packages.linuxmint.com xia Release
Reading package lists... Done
$ echo
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] Index of linux/ubuntu/
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update> > > $
Hit:1 Index of linux/ubuntu/ noble InRelease
Hit:2 Index of /wine-builds/ubuntu noble InRelease
Hit:3 Index of http://download.virtualbox.org/virtualbox/debian noble InRelease
Hit:4 Index of /ubuntu noble-security InRelease
Hit:5 Index of /ubuntu noble InRelease
Hit:6 Index of /debian/ stable InRelease
Ign:7 http://packages.linuxmint.com xia InRelease
Hit:8 Index of /ubuntu noble-updates InRelease
Hit:9 Index of /deb/stable/ noble InRelease
Ign:10 Index of /stable/deb/ stable InRelease
Hit:11 Index of /stable/deb/ stable Release
Hit:12 Index of /ubuntu noble-backports InRelease
Hit:13 http://packages.linuxmint.com xia Release
Reading package lists... Done
$ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
docker-ce is already the newest version (5:27.5.1-1~ubuntu.24.04~noble).
docker-ce-cli is already the newest version (5:27.5.1-1~ubuntu.24.04~noble).
containerd.io is already the newest version (1.7.25-1).
docker-buildx-plugin is already the newest version (0.20.0-1~ubuntu.24.04~noble).
docker-compose-plugin is already the newest version (2.32.4-1~ubuntu.24.04~noble).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
$ sudo usermod -aG docker $USER
$ sudo usermod -aG docker $ADMIN
Usage: usermod [options] LOGIN

Options:
-a, --append append the user to the supplemental GROUPS
mentioned by the -G option without removing
the user from other groups
-b, --badname allow bad names
-c, --comment COMMENT new value of the GECOS field
-d, --home HOME_DIR new home directory for the user account
-e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-f, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-g, --gid GROUP force use GROUP as new primary group
-G, --groups GROUPS new list of supplementary GROUPS
-h, --help display this help message and exit
-l, --login NEW_LOGIN new value of the login name
-L, --lock lock the user account
-m, --move-home move contents of the home directory to the
new location (use only with -d)
-o, --non-unique allow using duplicate (non-unique) UID
-p, --password PASSWORD use encrypted password for the new password
-P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files
-r, --remove remove the user from only the supplemental GROUPS
mentioned by the -G option without removing
the user from other groups
-R, --root CHROOT_DIR directory to chroot into
-s, --shell SHELL new login shell for the user account
-u, --uid UID new UID for the user account
-U, --unlock unlock the user account
-v, --add-subuids FIRST-LAST add range of subordinate uids
-V, --del-subuids FIRST-LAST remove range of subordinate uids
-w, --add-subgids FIRST-LAST add range of subordinate gids
-W, --del-subgids FIRST-LAST remove range of subordinate gids
-Z, --selinux-user SEUSER new SELinux user mapping for the user account

$ sudo systemctl enable docker
Synchronizing state of docker.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable docker
$ groups
admin adm cdrom sudo dip plugdev users lpadmin sambashare docker
$ docker pull stirlingtools/stirling-pdf:latest
latest: Pulling from stirlingtools/stirling-pdf
Digest: sha256:a570b6f6522d49fbef616e4fef97f7aff35ce046daee16de4e2fa4699a042d33
Status: Image is up to date for stirlingtools/stirling-pdf:latest
docker.io/stirlingtools/stirling-pdf:latest
$ mkdir -p StirlingPDF/{trainingData,extraConfigs,customFiles,logs,pipeline}
$ docker run -d
--name stirling-pdf
-p 8080:8080
-v "./StirlingPDF/trainingData:/usr/share/tessdata"
-v "./StirlingPDF/extraConfigs:/configs"
-v "./StirlingPDF/customFiles:/customFiles/"
-v "./StirlingPDF/logs:/logs/" \

-v "./StirlingPDF/pipeline:/pipeline/"
-e DOCKER_ENABLE_SECURITY=false
-e LANGS=en_GB
stirlingtools/stirling-pdf:latest> > > > > > > > >
docker: Error response from daemon: Conflict. The container name "/stirling-pdf" is already in use by container "2f2338eb2fa9c184337d758fa5a3e65f0ebe47b3bab0c2510c91a848e1db9d99". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
$

It seems like I wasn't actually able to uninstall docker. When I checked the version it simply said what version was still installed.

You know, the guy that made it, Andrew Stirling has said that he would like to have a flatpak version available on Flathub, but he doesn't know how to create it. If someone does know that world and wants a project it may be one of the greatest gifts to the beginner linux community ever! haha