There are several possible reasons but the first one is that only an
administrator, the root user, can install anything. Try "sudo apt-get ..."
(no quotes or dots, just insert the package name etc.). If you have Synaptic
or anything else open you will get the "can't lock" message, so check
(alt-tab) that you are only using one installation app. Open your browser to
make sure you are indeed connected to the internet, as the message about not
finding a repository is often caused by a lapsed internet connection.