Go to System > Administration > Software Sources.
Click Software Sources and enter your password when requested.
Click the second tab (entitled Third Party Software). Click the "+ Add" button and in the box which opens enter the following line (this is for 9.04, if using an earlier version of Ubuntu, simply change the word jaunty for intrepid or hardy, depending on your version)-
deb http://
After adding that line, click the Add Source button below this line.
Also add the following line (again, click the "+ Add" button as above and enter the following line, then click Add Source as above)
deb-src http://
This has added the two relevant repositories to your software list. You can now close the Software Sources window.
You will need the key to authenticate these additions, so open a terminal (Applications > Accessories > Terminal).
In the terminal, type (or copy and paste) -
sudo apt-key adv --recv-keys --keyserver keyserver.
Press enter.You will be asked for your password, so type that in
(note that nothing will show as you type in the password - but it is
working!).
Very quickly, the keyserver will be added and you can now update your software list with the following command in the terminal -
sudo apt-get update
Again, press enter, type in password when asked.
You will see the sources being updated - this may take a minute or two, depending on how recently you checked for updates.
OK, the basics are now all completed and you can close the terminal once all is done.
Now, head to your Synaptic Package Manager (System > Administration > Synaptic Package Manager) and uninstall kompozer. If you do not uninstall it, you will get an error at the next step.
Now Kompozer is removed, you can now install Kompozer again - but this time you will find you are installing a different version - this is the latest one which works correctly!