blang / latex-docker

Docker-based latex compilation
MIT License
579 stars 146 forks source link

Question: How to convert ps to pdf? #32

Closed siddjain closed 3 years ago

siddjain commented 3 years ago

Hello,

I just started using this docker image and have a question. I am not able to figure out how to convert the ps to pdf. Online search tells me to use ps2pdf but it looks like this program is not installed in the image. If I try to install anything using apt-get I get errors.

For example, this is what happens when I try to install ghostscript:

root@eea737608448:~# apt-get install ghostscript
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ghostscript

And this is what happens if I try to update the package index:

root@eea737608448:~# apt-get update
Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Btw using pdflatex is not an option for me due to the work I am doing. I need to convert a PS to PDF.

siddjain commented 3 years ago

It seems the issue is that this image is not able to resolve any domain names. You can try calling wget with any domain and it will fail.

siddjain commented 3 years ago

The problem here was I used --net none when I created my Docker container.