7

I've just installed a fresh copy of Ubuntu 18.10 on my system.
I updated the OS via sudo apt-get update and sudo apt-get upgrade commands.
After that I installed Google Chrome.

These are the only things I've done prior to installing the Sublime Text 3 text editor .

I obtained the install commands from Sublime Text's download web page.
Then I proceeded to install the editor using them.

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text

The installation completed without any hiccups, but when I try to launch the application, it fails to do so.

Here is the screenshot of the application launching.

You can see on the taskbar that the application is starting up, and the mouse pointer shows the loading animation (that doesn't show up on the screenshot though), but Sublime Text 3 doesn't start.

I don't get any errors or anything. I've even rechecked if I was missing any dependencies via terminal, and checked for updates and upgrades one more time, but nothing was missing. I've tried googling the issue, but haven't found anything.

EDIT: The solution to this issue, which I've tested on multiple PCs (that worked on all of them), is executing this command:

sudo apt-get install libgtk2.0-0

  • If someone has the same problem despite the libgtk2.0-0 is installed try see the owner of the /var folder, it has to be root, by mistake I've changed it. – Daniel Srp Jun 17 at 17:52
7
sudo apt-get install libgtk2.0-0
  • Welcome to Ask Ubuntu! ;-) Could you please edit your answer and explain why the user must perform this? As it now stands, the answer is a low quality answer ;-) – Fabby Nov 8 '18 at 11:20
  • Hey this one worked as well! It seems to be some sort of a prerequisite for the GUI. Thanks! – Aleksandar Čolović Nov 8 '18 at 16:33
4

Messing around with adding a PPA instead of installing the same application in Ubuntu Software can cause weird errors immediately and package management problems later on. To install the native Sublime text editor snap package (currently version 3.1.1) in all currently supported versions of Ubuntu open the terminal and type:

sudo snap install sublime-text --classic  

After Sublime text editor is installed it can be opened from the Dash by clicking on the Sublime icon or from the terminal with subl . The Sublime text editor snap package will be updated automatically when updates are available.

  • 1
    Thanks, this worked perfectly! I've never used or heard of snap before, even tho I'm not a total linux rookie. I've checked it out, and I like it! Thanks, once again! – Aleksandar Čolović Nov 8 '18 at 16:31
  • Hey a small note, the sudo apt-get install libgtk2.0-0 that the other commenter suggested seems to be a prerequisite. I've tried the snap install method on my second machine, but without the gtk it still doesn't work. – Aleksandar Čolović Nov 8 '18 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.