Unable to run Sublime Text 3 on Ubuntu 18.10

14,736

Solution 1

sudo apt-get install libgtk2.0-0

Solution 2

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.

Share:
14,736

Related videos on Youtube

Aleksandar Čolović
Author by

Aleksandar Čolović

Updated on September 18, 2022

Comments

  • Aleksandar Čolović
    Aleksandar Čolović over 1 year

    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

    • Daniel Srp
      Daniel Srp almost 5 years
      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.
  • Fabby
    Fabby over 5 years
    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 ;-)
  • Aleksandar Čolović
    Aleksandar Čolović over 5 years
    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ć
    Aleksandar Čolović over 5 years
    Hey this one worked as well! It seems to be some sort of a prerequisite for the GUI. Thanks!
  • Aleksandar Čolović
    Aleksandar Čolović over 5 years
    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.