Debian squeeze: change to hostname makes other packages unhappy?
If you use FQDNFQDN (Fully Qualified Domain Name), then FQDN should be before short name in /etc/hosts. Correct
127.0.1.1 ubuntu-1010-server-01.local ubuntu-1010-server-01
wrong;
127.0.1.1 ubuntu-1010-server-01 ubuntu-1010-server-01.local
or run:
sudo make-ssl-cert generate-default-snakeoil --force-overwrite
Related videos on Youtube
Comments
-
John Clements over 1 year
I'm working with a fresh Debian Squeeze install from Linode, and it looks like hostname behaves differently (from lenny) in a way that makes certain other packages unhappy. Viz:
clements@debian:/tmp/npm$ hostname -A li228-113.members.linode.com clements@debian:/tmp/npm$ hostname -f hostname: Name or service not known clements@debian:/tmp/npm$
This behavior differs from an older (lenny) installation, where hostname -f does not signal an error. Reading the man page suggests to me that squeeze isn't a big fan of the -f option since machines can have multiple fqdns. That's fine with me, but packages like make-ssl-cert get crabby about it:
Setting up ssl-cert (1.0.28) ... hostname: Name or service not known make-ssl-cert: Could not get FQDN, using "debian". make-ssl-cert: You may want to fix your /etc/hosts and/or DNS setup and run make-ssl-cert: make-ssl-cert generate-default-snakeoil --force-overwrite make-ssl-cert: again.
I'm hesitant to edit /etc/hosts; this wasn't required on my lenny VPS, and I have the feeling that it shouldn't be required here either.
Any suggestions greatly appreciated.
-
John Clements about 13 yearscan you shed some light on the change from lenny to squeeze? Why was this not required in lenny? Specifically, my lenny /etc/hosts has only the localhost line, and everything works fine.
-
ooshro about 13 yearsattach /etc/hosts to question. If you use FQDN, then FQDN should be before short name.
-
John Clements about 13 yearsI still feel like there's many things I don't understand going on here--other packages that provide this functionality--but adding the line you suggest certainly had the desired effect. Many thanks.
-
tsykoduk over 12 yearsran into this - needed to add fqdn, and aws's funky hostname to the hosts to resolve.