LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 07-30-2012, 03:36 PM   #1
nokangaroo
Member
 
Registered: Nov 2009
Posts: 141

Rep: Reputation: 25
Trying to build Gentoo Prefix in Mac OS - ftp unknown host error


I just downloaded the bootstrap-prefix script, but when I run it, it gives an "unknown host" error and terminates with an ftp prompt. It is NOT a connection problem, because the file exists and I can download it by hand. So what is wrong? Is Gentoo on the Mac a bad idea in the first place, if I run into trouble so soon?
 
Old 07-30-2012, 04:27 PM   #2
nokangaroo
Member
 
Registered: Nov 2009
Posts: 141

Original Poster
Rep: Reputation: 25
Solved - installed wget via MacPorts and changed line 37 in the script to

Code:
FETCH_COMMAND="/opt/local/bin/wget"
So Gentoo relies on the competition to work????? That's weird, dude.
 
Old 07-31-2012, 03:48 AM   #3
segmentation_fault
Member
 
Registered: Sep 2008
Location: Ioannina, Greece
Distribution: Gentoo
Posts: 332

Rep: Reputation: 55
Quote:
Originally Posted by nokangaroo View Post

So Gentoo relies on the competition to work????? That's weird, dude.
What do you mean by that? What competition? I just downloaded and burned the minimal install iso to get it working. I used a server running slackware at that time with only cli to do that.
 
Old 08-03-2012, 07:46 AM   #4
nokangaroo
Member
 
Registered: Nov 2009
Posts: 141

Original Poster
Rep: Reputation: 25
Thank you, segmentation_fault. I was making a joke (and talking of gentoo prefix on Max OS X).

I was actually coming back to suggest a change to bootstap-prefix.sh:

Instead of (lines 31 through 50):
Code:
efetch() {
	if [[ ! -e ${DISTDIR}/${1##*/} ]] ; then
		if [[ -z ${FETCH_COMMAND} ]] ; then
			# Try to find a download manager, we only deal with wget,
			# curl, FreeBSD's fetch and ftp.
			if [[ x$(type -t wget) == "xfile" ]] ; then
				FETCH_COMMAND="wget"
			elif [[ x$(type -t ftp) == "xfile" ]] ; then
				FETCH_COMMAND="ftp"
			elif [[ x$(type -t curl) == "xfile" ]] ; then
				einfo "WARNING: curl doesn't fail when downloading fails, please check its output carefully!"
				FETCH_COMMAND="curl -L -O"
			elif [[ x$(type -t fetch) == "xfile" ]] ; then
				FETCH_COMMAND="fetch"
			else
				eerror "no suitable download manager found (need wget, curl, fetch or ftp)"
				eerror "could not download ${1##*/}"
				exit 1
			fi
		fi
I suggest the following:
Code:
efetch() {
	if [[ ! -e ${DISTDIR}/${1##*/} ]] ; then
		if [[ -z ${FETCH_COMMAND} ]] ; then
			# Try to find a download manager, we only deal with wget,
			# curl, FreeBSD's fetch and ftp.
			if [[ "$(basename `which wget` 2> /dev/null)" == "wget" ]] ; then
				FETCH_COMMAND=`which wget`
			elif [[ "$(basename `which curl` 2> /dev/null)" == "curl" ]] ; then
				einfo "WARNING: curl doesn't fail when downloading fails, please check its output carefully!"
				FETCH_COMMAND="`which curl` -L -O"
			elif [["$(basename `which ftp` 2> /dev/null)" == "ftp" ]] ; then
				FETCH_COMMAND=`which ftp`
			elif [[ "$(basename `which fetch` 2> /dev/null)" == "fetch" ]] ; then
				FETCH_COMMAND=`which fetch`
			else
				eerror "no suitable download manager found (need wget, curl, fetch or ftp)"
				eerror "could not download ${1##*/}"
				exit 1
			fi
		fi
Note that ftp comes after curl which is installed by default.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
5.1.2 unknown host error CentOS sendmail gymiv@aol.com Linux - Software 3 09-23-2011 02:49 PM
Unable to ftp error : unknown host or invalid literal address Voyager7 Linux - Newbie 2 01-18-2011 08:02 AM
Host Unknown Error:Sendmail varun2109 Linux - Server 2 09-08-2009 11:49 PM
ERROR: Unknown HOST kaub Linux - General 2 06-19-2007 01:45 AM
i m getting the error unknown host while im pinging with the host name gunjan thakkar Linux - General 2 12-14-2004 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 04:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration