I followed the excellent gentoo 1.2 installation guide at http://www.gentoo.org/doc/build.html. However, in the section entitled "Final steps: /etc/hostname ", I missed the fact that the hostname should be in a file with a single line. I added a CR (or is that a LF) on the end. Oh, the woe this caused me! Apache failed as mod_unique complained about hostname resolution. Worse, kde failed to start as the DCOP server complained too (though neither of them actually told me there's a CR (or was it a LF) in the hostname. They let me wade through masses of google and forums.gentoo.org searches before I came to the correct result. Other people have fallen over this, see the URL in the subject or at least one other post on this subject on the gentoo forums (plus my woes). Suggestion: either make it REALLY, REALLY obvious that there should be NO CR/LF in the hostname file, or if the hostname command is available, tell the user to use that instead. (Just trying to make gentoo a better place, I lost a lot of hair through my own stupidity, I don't want anyone else to do the same :)
maybe a good solution is to do a code listing that says: # echo mymachine.mydomain.com>/etc/hostname and then put at the end 'make sure the /etc/hostname' file does not have a CR or LF at the end of the file
Fixed in the 1.4 install guide. //ZhEN