1. Bind Address Already in Use Error Message:
Error: Have you ever got this error message?
bind: Address already in use
This error basically means that the program that you are using is trying to lock or bind a port that is already locked or binded by another program or process, and therefore your program can not lock and bind this port. Thus, your program is not able to use this port at all, and your program stops working.
If you know what port number that your program is using, then you can query the operating system to see who has the port locked or binded. Let us assume that the port number that you are trying to use is port 45078. So, this command will display the status of this port:
netstat -a | grep 45078
If the status of the port is available or free, then it is "LISTENING" and it should look like this:
tcp 0 0 *.45078 *.* LISTEN
If the status of the port is not free, thus binded, then it will be either "CLOSED" or "WAITING" and it should look like this:
tcp 0 0 MACHINE_NAME.45078 IP_ADDRESS.PROCESS_ID CLOSE_WAIT
Please notice that both the IP address and process id of whatever has the port locked is listed above.
First, try running this netstat command several times to see if the port becomes free automatically.
Otherwise with this information, you have three possible solutions to resolve this problem. First, kill the process id if it is still an active process. Second, using the IP address, find the machine that is locking the port on your machine. You can either terminate the process that is keeping this port locked on this other machine or you can reboot this other machine. Finally, of course, you can always reboot your machine to severe this port connection too.
I hoped this helped.
2. could not open /dev/kbd
Well, I do. This week I kept getting this "could not open /dev/kbd to get keyboard type US keyboard assumed" warning message from several different UNIX scripts and programs, and it was driving me crazy.
Here is an example of what I was getting:
$ dos2unix file.txt > file2.txt
could not open /dev/kbd to get keyboard type US keyboard assumed
could not get keyboard type US keyboard assumed
After considerable investigation, I figured out that this UNIX warning message means that the UNIX server that I was connected to either had no keyboard attached to it or that the keyboard was not defined correctly.
The ideal solution is to attach or configure a keyboard to the server in question, but I did not have access to the server room. So I discovered (thanks to Google) that there is an undocumented argument to suppress certain types of warnings, so that you do not have to see this UNIX warning message any more.
For example, this produces no warning messages:
$ dos2unix -437 file.txt > file2.txt
Of course, this argument can suppress additional useful warning messages, and you can also re-direct stderr to /dev/null too.
I hope this helps someone.