I want to install Sublime Text 3 , but had a problem, my terminal is showing this error:
dpkg: error: dpkg status database is locked by another process
What shall I do?
I want to install Sublime Text 3 , but had a problem, my terminal is showing this error:
dpkg: error: dpkg status database is locked by another process
What shall I do?
This is probably because apt-get
is being used already. Close the Ubuntu software center, and if you are using dpkg
or apt-get
on a different tab, wait for it to finish.
If that doesn't work try rebooting.
If you don't want to reboot, try:
sudo rm /var/lib/dpkg/lock
Note that this could break your system and it should only be used if everything else doesn't work.
You need to add sudo
to your commands and check if apt-get
is already busy. If apt-get
is busy wait for it to finish.
Here are the steps to install Sublime text 3 using PPA:
Add Sublime text 3 PPA:
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
Install sublime text
sudo apt-get install sublime-text-installer
Create symbolic link so that you can run ST3 from terminal by typing subl
sudo ln -s /opt/Sublime\ Text\ 3/sublime_text /usr/bin/subl
Just to make sure if it's installed properly , try running it from terminal by typing
subl
Install ST3 from deb file :
Download deb package:
Head over to Sublime text website and download the deb package by clicking on Download for Ubuntu .
Change directory to location where you have saved the downloaded file:
If you have downloaded the deb in Download directory then in terminal type
cd Downloads/
this will change your directory to Downloads.
Install the package:
At present it's named sublime-text_build-3103_amd64.deb , for future release, replace the package name with new package name)
dpkg -i sublime-text_build-3103_amd64.deb
Note: If there are some errors with unresolved dependencies, run
apt-get install -f
afterwards.In case you face any issues or have doubt read How do I install a .deb file via the command line? and Install from a deb file, by dpkg -i or by apt?
.deb
files for Ubuntu are available for download, and it will remind you to upgrade when a new version is released. The debs also create/usr/bin/subl
and other files, so the PPA is pointless at this point. – MattDMo May 01 '16 at 21:21