New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install ghostscript in the web container (especially for TYPO3) #920

Closed
dahaupt opened this Issue Jun 13, 2018 · 10 comments

Comments

Projects
None yet
4 participants
@dahaupt
Copy link

dahaupt commented Jun 13, 2018

Is your feature request related to a problem? Please describe.
Creating thumbnails of PDF or AI files results in the following error message inside TYPO3 using the test "Convert image formats to jpg" inside the Install Tool:

Image generation failed
ImageMagick / GraphicsMagick handling is enabled, but the execute command returned an error. Please check your settings, especially ['GFX']['processor_path'] and ['GFX']['processor_path_lzw'] and ensure Ghostscript is installed on your server.

Describe the solution you'd like
To be able to read PDF and AI files and to create thumbnails we have to install Ghostscript inside the web container. After installing it, the rendering of PDF thumbnails works as expected.

Installation:

$ sudo apt-get install ghostscript
@rickmanelius

This comment has been minimized.

Copy link
Contributor

rickmanelius commented Jun 13, 2018

Also addressable with this one #918 related to being able to run sudo commands within the containers.

@rfay

This comment has been minimized.

Copy link
Member

rfay commented Jun 21, 2018

What we're going to do is support sudo in the container, so anybody can put whatever they need in there. #935 - that indirectly fixes this.

@rfay rfay referenced this issue Jun 25, 2018

Closed

v0.20.0 Release Checklist Due 2018-06-19 #907

8 of 8 tasks complete
@rfay

This comment has been minimized.

Copy link
Member

rfay commented Dec 6, 2018

Reopening, as there's discussion about making this standard for TYPO3's needs. Please follow up here with reasons that it needs to be installed by default. Thanks!

@rfay rfay reopened this Dec 6, 2018

@phifa

This comment has been minimized.

Copy link

phifa commented Jan 4, 2019

This should be default as it is needed for TYPO3 to run with all its features. Also when using the hooks feature I get ghostscript working, but the console output is showing errors.

hooks:
  post-start:
  - exec: sudo apt-get update 
  - exec: sudo apt-get install -y ghostscript
repo files push to container completed in 1m13.697019092s
Executing post-start commands...
--- Running exec command: sudo apt-get update && apt-get install -y --no-install-recommends apt-utils ---
W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E
W: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.
--- post-start exec command succeeded, output below ---
Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
Get:2 http://nginx.org/packages/debian stretch InRelease [2857 B]
Ign:3 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
Get:6 https://packages.sury.org/php stretch InRelease [6928 B]
Get:7 https://deb.nodesource.com/node_8.x stretch InRelease [4647 B]
Get:8 https://dl.yarnpkg.com/debian stable InRelease [13.4 kB]
Get:9 http://nginx.org/packages/debian stretch/nginx amd64 Packages [15.0 kB]
Get:10 http://security.debian.org stretch/updates/main amd64 Packages [579 kB]
Get:11 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [9488 kB]
Get:12 https://packages.sury.org/php stretch/main amd64 Packages [107 kB]
Get:13 https://deb.nodesource.com/node_8.x stretch/main Sources [762 B]
Get:14 https://deb.nodesource.com/node_8.x stretch/main amd64 Packages [1009 B]
Ign:8 https://dl.yarnpkg.com/debian stable InRelease
Get:15 https://dl.yarnpkg.com/debian stable/main all Packages [8168 B]
Get:16 https://dl.yarnpkg.com/debian stable/main amd64 Packages [8168 B]
Fetched 10.4 MB in 7s (1317 kB/s)
Reading package lists...

W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E
W: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.
--- Running exec command: sudo apt-get install -y ghostscript ---
debconf: delaying package configuration, since apt-utils is not installed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to start project.de: post-start exec failed: Failed to run docker-compose [-f /Users/phifa/projects/project.de/.ddev/docker-compose.yaml exec -e DDEV_EXEC=true -w /var/www/html/ -T web sudo apt-get install -y ghostscript], err='exit status 100', stdout='Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  dbus fonts-droid-fallback fonts-noto-mono gsfonts libavahi-client3
  libavahi-common-data libavahi-common3 libcups2 libcupsfilters1 libcupsimage2
  libdbus-1-3 libgs9 libgs9-common libijs-0.35 libjbig2dec0 libpaper-utils
  libpaper1 poppler-data
Suggested packages:
  default-dbus-session-bus | dbus-session-bus fonts-noto ghostscript-x
  cups-common poppler-utils fonts-japanese-mincho | fonts-ipafont-mincho
  fonts-japanese-gothic | fonts-ipafont-gothic fonts-arphic-ukai
  fonts-arphic-uming fonts-nanum
The following NEW packages will be installed:
  dbus fonts-droid-fallback fonts-noto-mono ghostscript gsfonts
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2
  libcupsfilters1 libcupsimage2 libdbus-1-3 libgs9 libgs9-common libijs-0.35
  libjbig2dec0 libpaper-utils libpaper1 poppler-data
0 upgraded, 19 newly installed, 0 to remove and 26 not upgraded.
Need to get 15.2 MB of archives.
After this operation, 52.4 MB of additional disk space will be used.
Get:1 http://security.debian.org stretch/updates/main amd64 libgs9-common all 9.26~dfsg-0+deb9u2 [5142 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 fonts-droid-fallback all 1:6.0.1r16-1.1 [1807 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 poppler-data all 0.4.7-8 [1451 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libdbus-1-3 amd64 1.10.26-0+deb9u1 [194 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 dbus amd64 1.10.26-0+deb9u1 [210 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 fonts-noto-mono all 20161116-1 [79.2 kB]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libavahi-common-data amd64 0.6.32-2 [118 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libavahi-common3 amd64 0.6.32-2 [52.0 kB]
Get:9 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libavahi-client3 amd64 0.6.32-2 [55.3 kB]
Get:10 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libcups2 amd64 2.2.1-8+deb9u2 [306 kB]
Get:11 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libcupsimage2 amd64 2.2.1-8+deb9u2 [122 kB]
Get:12 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libijs-0.35 amd64 0.35-12 [18.4 kB]
Get:13 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libjbig2dec0 amd64 0.13-4.1 [60.1 kB]
Get:14 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libpaper1 amd64 1.1.24+nmu5 [21.6 kB]
Get:15 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 gsfonts all 1:8.11+urwcyr1.0.7~pre44-4.3 [3126 kB]
Get:16 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libcupsfilters1 amd64 1.11.6-3 [129 kB]
Get:17 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libpaper-utils amd64 1.1.24+nmu5 [17.6 kB]
Get:18 http://security.debian.org stretch/updates/main amd64 libgs9 amd64 9.26~dfsg-0+deb9u2 [2211 kB]
Get:19 http://security.debian.org stretch/updates/main amd64 ghostscript amd64 9.26~dfsg-0+deb9u2 [98.7 kB]
Fetched 15.2 MB in 4s (3685 kB/s)
Selecting previously unselected package fonts-droid-fallback.
(Reading database ... 28830 files and directories currently installed.)
Preparing to unpack .../00-fonts-droid-fallback_1%3a6.0.1r16-1.1_all.deb ...
Unpacking fonts-droid-fallback (1:6.0.1r16-1.1) ...
Selecting previously unselected package poppler-data.
Preparing to unpack .../01-poppler-data_0.4.7-8_all.deb ...
Unpacking poppler-data (0.4.7-8) ...
Selecting previously unselected package libdbus-1-3:amd64.
Preparing to unpack .../02-libdbus-1-3_1.10.26-0+deb9u1_amd64.deb ...
Unpacking libdbus-1-3:amd64 (1.10.26-0+deb9u1) ...
Selecting previously unselected package dbus.
Preparing to unpack .../03-dbus_1.10.26-0+deb9u1_amd64.deb ...
Unpacking dbus (1.10.26-0+deb9u1) ...
Selecting previously unselected package fonts-noto-mono.
Preparing to unpack .../04-fonts-noto-mono_20161116-1_all.deb ...
Unpacking fonts-noto-mono (20161116-1) ...
Selecting previously unselected package libavahi-common-data:amd64.
Preparing to unpack .../05-libavahi-common-data_0.6.32-2_amd64.deb ...
Unpacking libavahi-common-data:amd64 (0.6.32-2) ...
Selecting previously unselected package libavahi-common3:amd64.
Preparing to unpack .../06-libavahi-common3_0.6.32-2_amd64.deb ...
Unpacking libavahi-common3:amd64 (0.6.32-2) ...
Selecting previously unselected package libavahi-client3:amd64.
Preparing to unpack .../07-libavahi-client3_0.6.32-2_amd64.deb ...
Unpacking libavahi-client3:amd64 (0.6.32-2) ...
Selecting previously unselected package libcups2:amd64.
Preparing to unpack .../08-libcups2_2.2.1-8+deb9u2_amd64.deb ...
Unpacking libcups2:amd64 (2.2.1-8+deb9u2) ...
Selecting previously unselected package libcupsimage2:amd64.
Preparing to unpack .../09-libcupsimage2_2.2.1-8+deb9u2_amd64.deb ...
Unpacking libcupsimage2:amd64 (2.2.1-8+deb9u2) ...
Selecting previously unselected package libijs-0.35:amd64.
Preparing to unpack .../10-libijs-0.35_0.35-12_amd64.deb ...
Unpacking libijs-0.35:amd64 (0.35-12) ...
Selecting previously unselected package libjbig2dec0:amd64.
Preparing to unpack .../11-libjbig2dec0_0.13-4.1_amd64.deb ...
Unpacking libjbig2dec0:amd64 (0.13-4.1) ...
Selecting previously unselected package libpaper1:amd64.
Preparing to unpack .../12-libpaper1_1.1.24+nmu5_amd64.deb ...
Unpacking libpaper1:amd64 (1.1.24+nmu5) ...
Selecting previously unselected package libgs9-common.
Preparing to unpack .../13-libgs9-common_9.26~dfsg-0+deb9u2_all.deb ...
Unpacking libgs9-common (9.26~dfsg-0+deb9u2) ...
Selecting previously unselected package libgs9:amd64.
Preparing to unpack .../14-libgs9_9.26~dfsg-0+deb9u2_amd64.deb ...
Unpacking libgs9:amd64 (9.26~dfsg-0+deb9u2) ...
Selecting previously unselected package ghostscript.
Preparing to unpack .../15-ghostscript_9.26~dfsg-0+deb9u2_amd64.deb ...
Unpacking ghostscript (9.26~dfsg-0+deb9u2) ...
Selecting previously unselected package gsfonts.
Preparing to unpack .../16-gsfonts_1%3a8.11+urwcyr1.0.7~pre44-4.3_all.deb ...
Unpacking gsfonts (1:8.11+urwcyr1.0.7~pre44-4.3) ...
Selecting previously unselected package libcupsfilters1:amd64.
Preparing to unpack .../17-libcupsfilters1_1.11.6-3_amd64.deb ...
Unpacking libcupsfilters1:amd64 (1.11.6-3) ...
Selecting previously unselected package libpaper-utils.
Preparing to unpack .../18-libpaper-utils_1.1.24+nmu5_amd64.deb ...
Unpacking libpaper-utils (1.1.24+nmu5) ...
Setting up libgs9-common (9.26~dfsg-0+deb9u2) ...
Setting up libpaper1:amd64 (1.1.24+nmu5) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline

Creating config file /etc/papersize with new version
Setting up fonts-droid-fallback (1:6.0.1r16-1.1) ...
Setting up libpaper-utils (1.1.24+nmu5) ...
Setting up gsfonts (1:8.11+urwcyr1.0.7~pre44-4.3) ...
Setting up poppler-data (0.4.7-8) ...
Setting up fonts-noto-mono (20161116-1) ...
Setting up libjbig2dec0:amd64 (0.13-4.1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up libijs-0.35:amd64 (0.35-12) ...
Setting up libdbus-1-3:amd64 (1.10.26-0+deb9u1) ...
Processing triggers for fontconfig (2.11.0-6.7+b1) ...
Setting up libavahi-common-data:amd64 (0.6.32-2) ...
Setting up libavahi-common3:amd64 (0.6.32-2) ...
Setting up dbus (1.10.26-0+deb9u1) ...
adduser: No UID/GID pair is available in the range 100-999 (FIRST_SYS_UID - LAST_SYS_UID).
adduser: The user `messagebus' was not created.
dpkg: error processing package dbus (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libavahi-client3:amd64 (0.6.32-2) ...
Setting up libcups2:amd64 (2.2.1-8+deb9u2) ...
Setting up libcupsimage2:amd64 (2.2.1-8+deb9u2) ...
Setting up libgs9:amd64 (9.26~dfsg-0+deb9u2) ...
Setting up ghostscript (9.26~dfsg-0+deb9u2) ...
Setting up libcupsfilters1:amd64 (1.11.6-3) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Errors were encountered while processing:
 dbus
', stderr='debconf: delaying package configuration, since apt-utils is not installed
E: Sub-process /usr/bin/dpkg returned an error code (1)', stderr='debconf: delaying package configuration, since apt-utils is not installed
E: Sub-process /usr/bin/dpkg returned an error code (1)'

it's all red in my terminal
grafik

@rfay

This comment has been minimized.

Copy link
Member

rfay commented Jan 4, 2019

The yarn key expired over the new year holiday, so everything was bad with it for a day or two. I thought they had it completely fixed.

@rfay

This comment has been minimized.

Copy link
Member

rfay commented Jan 7, 2019

@phifa The New-Year yarn key problem has been fixed in the pushed container, please use docker pull drud/ddev-webserver:v1.5.1 to fix locally and solve the apt-get key failure problem.

@phifa

This comment has been minimized.

Copy link

phifa commented Jan 7, 2019

i will just wait for ddev 1.6.0, as it will ship with ghostscript, right?

@rfay

This comment has been minimized.

Copy link
Member

rfay commented Jan 7, 2019

Yup! Or 1.5.2, not sure if it will be major or minor.

You can use it right now with webimage: drud/ddev-webserver:20190107_web_container_maint in your .ddev/config.yaml

@rfay

This comment has been minimized.

Copy link
Member

rfay commented Jan 7, 2019

I'd appreciate it if you could test that and make sure we're covering what you need for ghostscript, and also please add a comment on #1368 telling us how to test gs usage in TYPO3. Thanks!

rfay added a commit to rfay/ddev that referenced this issue Jan 7, 2019

@phifa

This comment has been minimized.

Copy link

phifa commented Jan 8, 2019

Tests passed successfully! No errors when starting ddev.

Creating ddev-router ... done

Executing post-start commands...
--- Running exec command: sudo apt-get update && apt-get install -y --no-install-recommends apt-utils ---
--- post-start exec command succeeded, output below ---
Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
Get:2 http://nginx.org/packages/debian stretch InRelease [2857 B]
Get:4 https://dl.yarnpkg.com/debian stable InRelease [13.4 kB]
Get:5 https://packages.sury.org/php stretch InRelease [6928 B]
Get:6 https://deb.nodesource.com/node_8.x stretch InRelease [4647 B]
Ign:3 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:7 http://security.debian.org stretch/updates/main amd64 Packages [579 kB]
Get:9 http://nginx.org/packages/debian stretch/nginx amd64 Packages [15.0 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:10 https://dl.yarnpkg.com/debian stable/main amd64 Packages [8168 B]
Get:11 https://dl.yarnpkg.com/debian stable/main all Packages [8168 B]
Get:12 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
Get:13 https://packages.sury.org/php stretch/main amd64 Packages [107 kB]
Get:14 https://deb.nodesource.com/node_8.x stretch/main Sources [762 B]
Get:15 https://deb.nodesource.com/node_8.x stretch/main amd64 Packages [1009 B]
Get:16 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [9488 kB]
Fetched 10.4 MB in 3s (2801 kB/s)
Reading package lists...


--- Running exec command: sudo apt-get install -y ghostscript ---
--- post-start exec command succeeded, output below ---
Reading package lists...
Building dependency tree...
Reading state information...
ghostscript is already the newest version (9.26~dfsg-0+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

rfay added a commit to rfay/ddev that referenced this issue Jan 8, 2019

@rfay rfay closed this in baa15bf Jan 9, 2019

@rfay rfay referenced this issue Jan 14, 2019

Closed

v1.5.2 Release Checklist Due 2019-01-15 #1343

6 of 8 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment