elinks “Host not found” crash in Arch Linux

I have come across with this problem for quite a long time. Whenever I elinks to a website, such as google.com or yahoo.com, it shows the message “Host not found”. I tried to google about the “elinks host not found”, “elinks resolve problem”, etc, none of them are relevant to my problem.

I thought it is the package error. But when I come across installation of the Arch Linux on a fresh computer, the elinks works fine.

The elinks can browse the http://localhost without any problem. And if I browse a website with the IP address (not the domain name), and if the website does not have redirection, then it works fine also. I think the problem is happened when elinks is trying to resolve the domain.

When going to seek for the help in the forum, in order to prepare significant information to other users, I tried to gather the error message as much as possible. Then I come across with the following message and I typed it out in “leafpad” (since copy and paste does not work in the terminal emulator).


From the error message, I found that there is something wrong about the libnss_wins.so.2. Then I remembered I have done something regarding the nss for the Samba before. Thus, I open the /etc/nsswitch.conf and found the “wins” in “hosts” key.

The following is the corresponding line,

hosts: files wins dns myhostname

I remembered that this setting was done long time ago, and elinks never faced this problem before. Just a trial-and-error, I remove the “wins” from the line and elinks to Google again. Now it works.

So, it is confirmed that the “wins” is a problem. Then I add the wins again and disable the sambad systemd service and run the elinks. The problem still exists. That means it is not the sambad service problem, but the nsswitch.conf.

As a result, I just put the “wins” after the “dns”. Now, elinks work fine.

As a conclusion, the “wins” can be added, but only after the “dns”. So that, the elinks will use the DNS to resolve the domain first instead of using libnss_wins.so to resolve the the Windows computer name before hand, which causes some errors. Problem solved.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s