I am using CVPR template, the tex compilation is OK on my local machine, but has following compilation error when uploading to arxiv.org:

! LaTeX Error: Command \@EveryShipout@Hook already defined. Or name
\end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation. Type H
<return> for immediate help. ...

l.77 \newcommand{\@EveryShipout@Hook}{}

? ! Emergency stop.

How to solve this error? How to reproduce the error on my local machine?


  • 1
    how old is your local tex system? Sep 13, 2021 at 8:29
  • 1
    Try localizing the error(s) by repeatedly a) "delete" one "half" and compile, b) same with the oterh "half, and repat. "Delete" can be delete, comment-out etc. "Half" can be 50 %, more or less. Converges quickly, even if the trouble maker should be setting somewhere.
    – MS-SPO
    Sep 13, 2021 at 8:30
  • I'm using TeXstudio 3.1.2. The whole tex is running well on my local machine. It doesn't make any sense to me that delete one "half" and compile would reproduce the error. But I will try your method, thanks for showing me a way.
    – Chris Guo
    Sep 13, 2021 at 8:38
  • 1
    Texstudio is an editor, it has no relevans here. We need to know exactly which latex system you are using (it is listed at the top of the log file when you compile on your own system).
    – daleif
    Sep 13, 2021 at 8:40
  • 1
    tex errors always give a line number. For example the error message you show in the question relates to line 77 of some file but we can not tell which file as you have only shown a fragment. Sep 13, 2021 at 9:20

1 Answer 1


I just fixed a similar issue on my ubuntu 18.04 laptop. Using the "new" CVPR template with my texlive installation (version 2017).

It turns out that newer versions of texlive work with the new CVPR template. I followed some answers on here to remove my existing installation (although the texlive website points out that you can also have multiple versions installed in parallel) and then installed the 2022 version. Sadly, I did not find that in an ubuntu repository, so I installed it as per the quickinstall page.


sudo apt-get remove texlive*
rm -rf /usr/local/texlive/20*
rm -rf ~/.texlive20*

Pre-Install & Install

We need a user-writable directory to install to, unless we want to install as sudo.

sudo mkdir -p /usr/local/texlive/$(date +%Y)
sudo chown -R "$USER" /usr/local/texlive
# choose any tmp directory you like to download the texlive installer:
mkdir /tmp/texlive
cd /tmp/texlive
wget  https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
unzip ./install-tl.zip -d install-tl
cd install-tl/install-tl-$(date +%Y%m%d)
perl ./install-tl


The script tells you that you need some paths added to some environment variables. Adding the following to my ~/.bashrc worked, but only if I then launch texmaker from a terminal that already has the environment variables.

export MANPATH="$MANPATH:/usr/local/texlive/2022/texmf-dist/doc/man"
export INFOPATH="$INFOPATH:/usr/local/texlive/2022/texmf-dist/doc/info"
export PATH=/usr/local/texlive/2022/bin/x86_64-linux:$PATH

Putting these into /etc/profile (for all users) or ~/.profile for just you could be a better idea because it will work on more shells than just bash. But it will also require a new login if not a full restart.

  • Because of the "post-install" steps, you shouldn't need the "removal" steps.
    – Teepeemm
    Jan 24, 2023 at 1:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .