Encountered permission denied error when compile pytorch on linux

292b49ed34db4b6e3686: <p>I follow the descriptions on here: <a href="https://github.com/pytorch/pytorch#from-source" rel="nofollow noopener">https://github.com/pytorch/pytorch#from-source</a> to compile the pytorch on linux.<br>
I compiled in a conda env.<br>
But I encountered a permission denied error. The log is:</p>
<pre><code class="lang-auto">[70/3523] Performing build step for 'nccl_external'
FAILED: nccl_external-prefix/src/nccl_external-stamp/nccl_external-build nccl/lib/libnccl_static.a
cd /home/wangshihao/PycharmProjects/hrnet/pytorch/third_party/nccl/nccl &amp;&amp; env CCACHE_DISABLE=1 SCCACHE_DISABLE=1 make CXX=/usr/local/bin/c++ CUDA_HOME=/usr/local/cuda NVCC=/usr/local/cuda/bin/nvcc NVCC_GENCODE=-gencode=arch=compute_75,code=sm_75 BUILDDIR=/home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl VERBOSE=0 -j &amp;&amp; /home/wangshihao/miniconda3/envs/hrnet/bin/cmake -E touch /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl_external-prefix/src/nccl_external-stamp/nccl_external-build
make -C src build BUILDDIR=/home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl
make[1]: Entering directory `/home/wangshihao/PycharmProjects/hrnet/pytorch/third_party/nccl/nccl/src'
Grabbing   include/nccl_net.h                  &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/include/nccl_net.h
Generating nccl.h.in                           &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/include/nccl.h
Compiling  init.cc                             &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/init.o
Compiling  channel.cc                          &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/channel.o
Compiling  bootstrap.cc                        &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/bootstrap.o
Compiling  transport.cc                        &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport.o
Compiling  enqueue.cc                          &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/enqueue.o
Compiling  misc/group.cc                       &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/group.o
Compiling  misc/nvmlwrap.cc                    &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/nvmlwrap.o
Compiling  misc/ibvwrap.cc                     &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/ibvwrap.o
Compiling  misc/rings.cc                       &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/rings.o
Compiling  misc/utils.cc                       &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/utils.o
Compiling  misc/argcheck.cc                    &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/argcheck.o
Compiling  misc/trees.cc                       &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/trees.o
Compiling  misc/topo.cc                        &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/topo.o
Compiling  transport/p2p.cc                    &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/p2p.o
Compiling  transport/shm.cc                    &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/shm.o
Compiling  transport/net.cc                    &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/net.o
Compiling  transport/net_socket.cc             &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/net_socket.o
Compiling  transport/net_ib.cc                 &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/net_ib.o
Compiling  collectives/all_reduce.cc           &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/all_reduce.o
Compiling  collectives/all_gather.cc           &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/all_gather.o
Compiling  collectives/broadcast.cc            &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/broadcast.o
Compiling  collectives/reduce.cc               &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/reduce.o
Compiling  collectives/reduce_scatter.cc       &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/reduce_scatter.o
Generating nccl.pc.in                          &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/lib/pkgconfig/nccl.pc
make[2]: Entering directory `/home/wangshihao/PycharmProjects/hrnet/pytorch/third_party/nccl/nccl/src/collectives/device'
Generating rules                               &gt; /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/device/Makefile.rules
/bin/sh: ./gen_rules.sh: Permission denied
</code></pre>
<p>Can anyone help me? Thank you very much~</p>

292b49ed34db4b6e3686: <p>See <a href="https://github.com/pytorch/pytorch/issues/33130" rel="nofollow noopener">https://github.com/pytorch/pytorch/issues/33130</a> which can solve this problem.</p>