The file /etc/hosts couldn't be written.

Report any found bug here. We are grateful for any useful clues.

Moderator: severin

Post Reply
ashedryden
Posts: 1
Joined: Wed 30. Mar 2011, 15:08

The file /etc/hosts couldn't be written.

Post by ashedryden » Wed 30. Mar 2011, 15:14

I see multiple people have posted about this issue, but none seem to resolve my problem.

I have just installed MAMP Pro over my old copy of MAMP.

When I start MAMP Pro I receive the error "The file /etc/hosts couldn't be written."

I checked my hosts file and there is nothing in it that says null. I have the few localhost addresses, plus some external IPs used to access servers I SSH to. Nothing is missing an alias, there are no extra lines, etc.

I tried changing the perms on the file, that didn't help.

I tried starting MAMP first, stopping the servers, and checking the hosts list, but the only thing in there is the default localhost address.

This is keeping me from using MAMP Pro at all, which I'm not exactly thrilled about :/ Would love any help you can provide.

herojig
Posts: 2
Joined: Wed 25. Nov 2009, 03:57

Re: The file /etc/hosts couldn't be written.

Post by herojig » Wed 8. Jun 2011, 07:33

Same here...have not used in months, but went to fire up and that's what I get too!

marketman
Posts: 1
Joined: Wed 22. Jun 2011, 05:04

Re: The file /etc/hosts couldn't be written.

Post by marketman » Thu 23. Jun 2011, 20:48

Just out of curiosity did you use a patcher application for your host file while installing Adobe software? I found invisible junk in my host file, after deleting that item MAMP Pro started up like a champ.

herojig
Posts: 2
Joined: Wed 25. Nov 2009, 03:57

Re: The file /etc/hosts couldn't be written.

Post by herojig » Fri 24. Jun 2011, 08:35

My problem went away by just uninstalling MAMP+PRO and reinstalling. Works like a charm now...

kense
Posts: 1
Joined: Thu 21. Jul 2011, 15:06

Re: The file /etc/hosts couldn't be written.

Post by kense » Thu 21. Jul 2011, 17:27

So if I have other text in the etc/hosts file then MAMP Pro won't work? Wish I'd read this board before spending my hard earned cash!

izo
Posts: 2
Joined: Mon 25. Jul 2011, 08:21

Re: The file /etc/hosts couldn't be written.

Post by izo » Mon 25. Jul 2011, 08:46

Same issue for me .

stewd
Posts: 1
Joined: Mon 10. Oct 2011, 19:28

Re: The file /etc/hosts couldn't be written.

Post by stewd » Mon 10. Oct 2011, 19:33

marketman wrote:Just out of curiosity did you use a patcher application for your host file while installing Adobe software? I found invisible junk in my host file, after deleting that item MAMP Pro started up like a champ.
Just incase any one else is having the Issue,

You need to clear your hosts file,

Not completely, but any Adobe "Stuff" (AKA if you have patched your Adobe) Needs to be removed from the host file, As it conflicts with the Pro Version,

I can confirm the Free Version is not effected by this.


Stewart,

softandbyte
Posts: 1
Joined: Tue 18. Oct 2011, 19:25

Re: The file /etc/hosts couldn't be written.

Post by softandbyte » Wed 19. Oct 2011, 09:05

i have the same problem, i changed read write rights already but problem stays

Mabawsi
Posts: 1
Joined: Thu 17. Nov 2011, 13:13

Re: The file /etc/hosts couldn't be written.

Post by Mabawsi » Thu 17. Nov 2011, 13:21

stewd wrote:
marketman wrote:Just out of curiosity did you use a patcher application for your host file while installing Adobe software? I found invisible junk in my host file, after deleting that item MAMP Pro started up like a champ.
Just incase any one else is having the Issue,

You need to clear your hosts file,

Not completely, but any Adobe "Stuff" (AKA if you have patched your Adobe) Needs to be removed from the host file, As it conflicts with the Pro Version,

I can confirm the Free Version is not effected by this.


Stewart,



Here's a solution that will work.

Mamp keeps a backup of your hosts file called hosts.mamp.bak

1st copy ur corrupted(?) hosts file to your docs and then copy over the hosts.mamp.bak file to hosts.

if you see hosts.mamp.bak they still have the adobe nullifiers. And now MAMP PRO works too!

also mine stopped working because i did a 'mate /etc/hosts/ from the terminal which, I suspect, screwed up the permissions somehow.

Claims that it is because of that patcher utility you used for Adobe products, is bull sheet. :)

gonano
Posts: 1
Joined: Sat 12. Apr 2008, 14:48

Re: The file /etc/hosts couldn't be written.

Post by gonano » Fri 18. May 2012, 05:26

For anyone else having this problem.

My fix was to uninstall mamp pro and the standard version too by using their uninstall apps located on their own folders in /Applications/Mamp/ and /Applications/Mamp Pro/
The uninstall app gave me errors about two folders not being able to be erased or accessed. I don't remember which ones but if the problem you're having is same as mine was, you'll get a prompt of the folder names. Folders were located in:

~/Library/Preferences
~/Library/Application Support

I deleted those manually and restarted the uninstall app. I also deleted the following two files from the ~/Library/Preferences folder:

de.appsolute.MAMP.plist
de.appsolute.mamppro.plist.lockfile

Rebooted and installed Mamp Pro.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests