How can I remove the following error?

! I can't write on file `thesis.dvi'.
Please type another file name for output
! Emergency stop.
  • 2
    Welcome to TeX.SX! Please post a MWE (minimal code sampler) which produces the error. But your one seems that you have opened a dvi-viewer which blocks the file or you do not have writing permissions. – TeXnician Apr 18 '17 at 10:00

Let me guess: you are using Windows, right? Windows has a peculiar file locking mechanism preventing writing to a file open for reading. TeX wants to write to the dvi file, but your viewer does not allow this. Close the viewer and retry.

If it does not help, see https://serverfault.com/questions/1966/how-do-you-find-what-process-is-holding-a-file-open-in-windows

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.