I recently know that there is software viz. SANE [Scanner Access Now Easy] which can automatically detect printer (almost all the printer) and one can easily scan via this software. So I search for that and find a page sane community and from this page, I get a command to install SANE. The command is
sudo apt-get install sane sane-utils libsane-extras xsane
But while running this command in the terminal, it gives some errors and installation is not done.
The error message is shown in the picture.
Try restarting your PC.
If the error persists then execute the command
Then try again.
What happens is that when ypu try installing a package/packages the package manager acquires the a lock on the database so that another instance of the package manager does not simultaneously perform operations.
Sometimes this process gets interrupted and the lock does not get released so you have to do it manually.