Ubuntu has software that looks for packages that need updating. If it is doing this, it will not allow you to install using the command line. Look on the task bar for something that has taken control...