# Sudo make toolchain/install failed

**URL:** <https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865>\
**Category:** For Developers\
**Created:** [December 28, 2018, 3:16pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865 "2018-12-28T15:16:18Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![aceautomation](https://forum.openwrt.org/letter_avatar/aceautomation/32/6_449c533f586939b6e5f246632a46421f.png) [@aceautomation](https://forum.openwrt.org/u/aceautomation)\
**Post date:** [December 28, 2018, 3:16pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/1 "2018-12-28T15:16:18Z")

</div>

Greetings,  
For some days, I'm looking for why I've this issue.  
I setuped a Laptop with Ubuntu.  
I followed the " Build system – Installation " developer guide.  
Then the " "Hello, world!" for OpenWrt ".  
The Hello world program works on my laptop, but before that, the sudo make toolchain/install command doesnt work, I've an issue :

```
ace@ubuntu:/home/buildbot/source$ sudo make toolchain/install
 make[1] toolchain/install
 make[2] tools/install
 make[3] -C tools/flock compile
 make[3] -C tools/flock install
 make[3] -C tools/sed compile
 make[3] -C tools/sed install
 make[3] -C tools/patch compile
 make[3] -C tools/patch install
 make[3] -C tools/xz compile
 make[3] -C tools/xz install
 make[3] -C tools/tar compile
make -r toolchain/install: build failed. Please re-run make with -j1 V=s to see what's going on
/home/buildbot/source/include/toplevel.mk:205: recipe for target 'toolchain/install' failed
make: *** [toolchain/install] Error 1

```

So, what can I do for help you to help me 🙂  
I test with -j1 V=s, and I've this :

```
checking for mkdtemp... yes
checking whether mkfifo rejects trailing slashes... yes
checking whether mknod can create fifo without root privileges... configure: error: in `/home/buildbot/source/build_dir/host/tar-1.29':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See `config.log' for more details
Makefile:30: recipe for target '/home/buildbot/source/build_dir/host/tar-1.29/.configured' failed
make[3]: *** [/home/buildbot/source/build_dir/host/tar-1.29/.configured] Error 1
make[3]: Leaving directory '/home/buildbot/source/tools/tar'
tools/Makefile:147: recipe for target 'tools/tar/compile' failed
make[2]: *** [tools/tar/compile] Error 2
make[2]: Leaving directory '/home/buildbot/source'
tools/Makefile:145: recipe for target '/home/buildbot/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny' failed
make[1]: *** [/home/buildbot/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/buildbot/source'
/home/buildbot/source/include/toplevel.mk:205: recipe for target 'toolchain/install' failed
make: *** [toolchain/install] Error 2

```

Thanks  
Rémi

---

<div class="post-metadata">

**Author:** ![hnyman](https://forum.openwrt.org/user_avatar/forum.openwrt.org/hnyman/32/19_2.png) [@hnyman](https://forum.openwrt.org/u/hnyman)\
**Post date:** [December 28, 2018, 3:48pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/2 "2018-12-28T15:48:10Z")

</div>

> [@aceautomation](#):
>
> the sudo make toolchain/install command doesnt work

All OpenWrt toolchain related commands should be run without sudo.  
If you need that (=root account rights), there is something wrong with your setup.

---

<div class="post-metadata">

**Author:** ![aceautomation](https://forum.openwrt.org/letter_avatar/aceautomation/32/6_449c533f586939b6e5f246632a46421f.png) [@aceautomation](https://forum.openwrt.org/u/aceautomation)\
**Post date:** [December 28, 2018, 5:01pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/3 "2018-12-28T17:01:39Z")

</div>

Okay, thanks, I'll look that way and keep you informed.  
Thanks again.  
Happy New Year.  
Rémi

---

<div class="post-metadata">

**Author:** ![aceautomation](https://forum.openwrt.org/letter_avatar/aceautomation/32/6_449c533f586939b6e5f246632a46421f.png) [@aceautomation](https://forum.openwrt.org/u/aceautomation)\
**Post date:** [December 28, 2018, 9:06pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/4 "2018-12-28T21:06:21Z")

</div>

Hi hnyman!  
I used `sudo passwd root` then `su root` for become a root account.  
Right now, I can enter commands without sudo.  
But I've still the same issue.

```
root@ubuntu:/home/buildbot/source# make toolchain/install
 make[1] toolchain/install
 make[2] tools/install
 make[3] -C tools/flock compile
 make[3] -C tools/flock install
 make[3] -C tools/sed compile
 make[3] -C tools/sed install
 make[3] -C tools/patch compile
 make[3] -C tools/patch install
 make[3] -C tools/xz compile
 make[3] -C tools/xz install
 make[3] -C tools/tar compile
make -r toolchain/install: build failed. Please re-run make with -j1 V=s to see what's going on
/home/buildbot/source/include/toplevel.mk:198: recipe for target 'toolchain/install' failed
make: *** [toolchain/install] Error 1
root@ubuntu:/home/buildbot/source# 

```

With make toolchain/install -j1 V=s

```
checking for mkdtemp... yes
checking whether mkfifo rejects trailing slashes... yes
checking whether mknod can create fifo without root privileges... configure: error: in `/home/buildbot/source/build_dir/host/tar-1.29':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See `config.log' for more details
Makefile:30: recipe for target '/home/buildbot/source/build_dir/host/tar-1.29/.configured' failed
make[3]: *** [/home/buildbot/source/build_dir/host/tar-1.29/.configured] Error 1
make[3]: Leaving directory '/home/buildbot/source/tools/tar'
tools/Makefile:147: recipe for target 'tools/tar/compile' failed
make[2]: *** [tools/tar/compile] Error 2
make[2]: Leaving directory '/home/buildbot/source'
tools/Makefile:145: recipe for target '/home/buildbot/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny' failed
make[1]: *** [/home/buildbot/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/buildbot/source'
/home/buildbot/source/include/toplevel.mk:198: recipe for target 'toolchain/install' failed
make: *** [toolchain/install] Error 2
root@ubuntu:/home/buildbot/source# 

```

I always the same issue for some days !  
I followed this steps : [https://openwrt.org/docs/guide-developer/helloworld/chapter1](https://openwrt.org/docs/guide-developer/helloworld/chapter1)  
I was unders ubuntu then I change my laptop and I'm under ubuntu with kubuntu.  
I deleted the source directory before restart from the beginning.

If you have an idea about what happen ?  
Thanks a lot  
Rémi

---

<div class="post-metadata">

**Author:** ![slh](https://forum.openwrt.org/user_avatar/forum.openwrt.org/slh/32/113591_2.png) [@slh](https://forum.openwrt.org/u/slh)\
**Post date:** [December 28, 2018, 9:14pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/5 "2018-12-28T21:14:40Z")

</div>

Again, you do not build anything (and OpenWrt in particular) as root, never - neither through su, sudo nor some weird other method of attaining root rights.

Just delete whatever you have done, leave root - clone it fresh as ordinary user and get started (again, everything as normal non-root user, without any kind of elevated rights).

---

<div class="post-metadata">

**Author:** ![aceautomation](https://forum.openwrt.org/letter_avatar/aceautomation/32/6_449c533f586939b6e5f246632a46421f.png) [@aceautomation](https://forum.openwrt.org/u/aceautomation)\
**Post date:** [December 28, 2018, 9:50pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/6 "2018-12-28T21:50:43Z")

</div>

Ok, thanks, I will try tomorrow.. (22:50 here)

---

<div class="post-metadata">

**Author:** ![ZebraOnPC](https://forum.openwrt.org/user_avatar/forum.openwrt.org/zebraonpc/32/36185_2.png) [@ZebraOnPC](https://forum.openwrt.org/u/ZebraOnPC)\
**Post date:** [February 18, 2022, 8:27pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/7 "2022-02-18T20:27:56Z")

</div>

what is wrong with use root only ?  
it is a virtual tempopary mashine no one gonna hack it

---

<div class="post-metadata">

**Author:** ![slh](https://forum.openwrt.org/user_avatar/forum.openwrt.org/slh/32/113591_2.png) [@slh](https://forum.openwrt.org/u/slh)\
**Post date:** [February 18, 2022, 8:28pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/8 "2022-02-18T20:28:54Z")

</div>

Don't do it.  
It's bad practice, dangerous to the buildsystem and untested.  
Most of all, there's no need to do so.

---

<div class="post-metadata">

**Author:** ![ZebraOnPC](https://forum.openwrt.org/user_avatar/forum.openwrt.org/zebraonpc/32/36185_2.png) [@ZebraOnPC](https://forum.openwrt.org/u/ZebraOnPC)\
**Post date:** [February 18, 2022, 8:30pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/9 "2022-02-18T20:30:40Z")

</div>

thanks i got it now  
it is ok to use root if i just need 1 firmware

---

<div class="post-metadata">

**Author:** ![slh](https://forum.openwrt.org/user_avatar/forum.openwrt.org/slh/32/113591_2.png) [@slh](https://forum.openwrt.org/u/slh)\
**Post date:** [February 18, 2022, 8:32pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/10 "2022-02-18T20:32:38Z")

</div>

It.Is. **NOT**.OK.

---

<div class="post-metadata">

**Author:** ![ZebraOnPC](https://forum.openwrt.org/user_avatar/forum.openwrt.org/zebraonpc/32/36185_2.png) [@ZebraOnPC](https://forum.openwrt.org/u/ZebraOnPC)\
**Post date:** [February 18, 2022, 8:33pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/11 "2022-02-18T20:33:40Z")

</div>

i dont care if my virtual system brakes i have a clone

---

<div class="post-metadata">

**Author:** ![eduperez](https://forum.openwrt.org/user_avatar/forum.openwrt.org/eduperez/32/2066_2.png) [@eduperez](https://forum.openwrt.org/u/eduperez)\
**Post date:** [February 18, 2022, 8:47pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/12 "2022-02-18T20:47:09Z")

</div>

> [@ZebraOnPC](#):
>
> what is wrong with use root only ?

What's wrong with not using root!?

---

<div class="post-metadata">

**Author:** ![ZebraOnPC](https://forum.openwrt.org/user_avatar/forum.openwrt.org/zebraonpc/32/36185_2.png) [@ZebraOnPC](https://forum.openwrt.org/u/ZebraOnPC)\
**Post date:** [February 18, 2022, 8:55pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/13 "2022-02-18T20:55:58Z")

</div>

Nothing wrong with it just one more command at every command  
but now i try to make firmware under user  
here because under root didnt work out  
[https://forum.openwrt.org/t/setting-up-a-build-server-in-virtualbox-cant-understand/120609/19?u=zebraonpc](https://forum.openwrt.org/t/setting-up-a-build-server-in-virtualbox-cant-understand/120609/19)

---

<div class="post-metadata">

**Author:** ![frollic](https://forum.openwrt.org/user_avatar/forum.openwrt.org/frollic/32/30113_2.png) [@frollic](https://forum.openwrt.org/u/frollic)\
**Post date:** [February 18, 2022, 10:13pm UTC](https://forum.openwrt.org/t/sudo-make-toolchain-install-failed/27865/14 "2022-02-18T22:13:38Z")

</div>

> [@ZebraOnPC](#):
>
> just one more command at every command

It's not.

```plaintext
useradd whateverusername
su - whateverusername

```
