Skip to content
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

pandoc: pdflatex: createProcess: posix_spawnp: illegal operation (Inappropriate ioctl for device) #7570

Closed
samrxth opened this issue Sep 15, 2021 · 14 comments
Labels

Comments

@samrxth
Copy link

samrxth commented Sep 15, 2021

Explain the problem.
Pandoc conversions fail with the message

pandoc: pdflatex: createProcess: posix_spawnp: illegal operation (Inappropriate ioctl for device)

Pandoc version?
M1 MAC BOOK AIR, MAC OS BIG SUR

@samrxth samrxth added the bug label Sep 15, 2021
@jgm
Copy link
Owner

jgm commented Sep 15, 2021

Haven't seen this before, but I've seen a slightly different issue on M1 macs solved by specifying the full path to the pdflatex program.

pandoc -o my.pdf --pdf-engine=/Library/TeX/texbin/pdflatex

See pandoc FAQs.

@samrxth
Copy link
Author

samrxth commented Sep 16, 2021

pandoc -o test.pdf smt.org --pdf-engine=/Library/TeX/texbin/pdflatex
pandoc: /Library/TeX/texbin/pdflatex: createProcess: posix_spawnp: illegal operation (Inappropriate ioctl for device)```

@samrxth
Copy link
Author

samrxth commented Sep 16, 2021

So I uninstalled mactex, installed basictex and now it works

@samrxth samrxth closed this as completed Sep 16, 2021
@Sjors
Copy link

Sjors commented Sep 20, 2021

For me it was a matter of closing and reopening the terminal.
Intel iMac running macOS 11.6. Pandoc is installed via homebrew,

@userr-s
Copy link

userr-s commented Sep 25, 2021

I uninstalled MikTeX, BasicTeX and reinstalled BasicTeX and it worked.

@anka-213
Copy link

anka-213 commented Nov 3, 2021

This extremely cryptic message means that pdflatex does not exist in PATH.

pandoc: pdflatex: createProcess: posix_spawnp: illegal operation (Inappropriate ioctl for device)

If you would try running pdflatex in a terminal, you would get a less cryptic error.

@chrisdone-artificial
Copy link

chrisdone-artificial commented Mar 16, 2022

I had a similar error doing createProcess on M1. It's probably because you're trying to launch an x86 program.

I fixed this by prepending arch -x86_64 before the command in createProcess. That explicitly makes rosetta do its thing. I noticed that it will implicitly handle programs in the shell, but not if launched directly.

@stefins
Copy link

stefins commented Apr 11, 2022

I'm also facing the same issue in macOS Big Sur

@dreamerlzl
Copy link

I follow the instructions here and solve the issue.
I am using mac m1.

@SurenNihalani
Copy link

--pdf-engine=/Library/TeX/texbin/pdflatex worked for me but ran into a different exception:


! LaTeX Error: Unicode character   (U+2002)
               not set up for use with LaTeX.

@soapdog
Copy link

soapdog commented Sep 9, 2022

I'm also running on the same problem as above.

@Altair-Bueno
Copy link

TLDR for macOS Homebrew

path+='/Library/TeX/texbin'

Apparently BasicTex binaries (xelatex, pdflatex,...) are no longer on Homebrew path

@soapdog
Copy link

soapdog commented Sep 15, 2022

I'm not using homebrew and the binaries were in my path.

@NatureHeritage
Copy link

Same problem when using mapview to export a leaflet map as pdf:
pandoc: pdflatex: createProcess: posix_spawnp: illegal operation (Inappropriate ioctl for device)
Error: pandoc document conversion failed with error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests