View previous topic :: View next topic |
Author |
Message |
davidshen84 Guru
Joined: 09 Aug 2008 Posts: 314
|
Posted: Sat Apr 03, 2021 12:53 am Post subject: curl cannot resolve hosts when running in emerge |
|
|
Hi,
I write a simple ebuild which just download their tarball and run "make all". The "ebuild ... install" command works without any error and create the correct file layout in the "image" directory.
But when I try to emerge the package to my live system, I got "curl: (6) Could not resolve host: github.com" constantly. Even it occasionally got resolved, the download will be interrupted and fail.
The "curl" command is NOT issued by the ebuild, but by the "Makefile" from the tarball. I wonder if gentoo has any restriction on running "curl" during emerge.
By the way, my host system can access the network normally. So I don't think it is my host network issue. _________________ David Shen |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sat Apr 03, 2021 1:24 am Post subject: |
|
|
Please post the output of
Code: |
cat /etc/resolv.conf
cat /etc/nsswitch.conf
dig @<your-nameserver> github.com
|
_________________
|
|
Back to top |
|
|
halcon l33t
Joined: 15 Dec 2019 Posts: 629
|
Posted: Sat Apr 03, 2021 1:43 am Post subject: Re: curl cannot resolve hosts when running in emerge |
|
|
davidshen84 wrote: | I wonder if gentoo has any restriction on running "curl" during emerge. |
Yes, there are restrictions for curl, wget and all the programs alike. Everything should be downloaded via the standard ebuild means (SRC_URI etc). It was discussed on the forum some months earlier. _________________ A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21595
|
Posted: Sat Apr 03, 2021 4:02 pm Post subject: |
|
|
This is a defect in the upstream build system. It should not be downloading anything as part of make. You may be able to discourage it from doing this with a configuration parameter or by having the ebuild arrange for the required dependencies to be available before calling emake. |
|
Back to top |
|
|
|