Sublime Forum

Unable to install Sublime Text on Ubuntu — Missing APT repository configuration

#1

Hi everyone!

I was following the installation instructions for Sublime Text on Ubuntu, but I ran into an issue when trying to install the package.

After adding the GPG key:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo tee /etc/apt/keyrings/sublimehq-pub.asc > /dev/null

I ran:

sudo apt-get update
sudo apt-get install sublime-text

However, the installation failed with:

E: Unable to locate package sublime-text

Root cause

The GPG key was added successfully, but the Sublime Text APT repository had not been configured.

As a result, apt-get update did not fetch the Sublime Text package index, and APT could not locate the package.

Solution

The issue was resolved by explicitly adding the Sublime Text repository:

echo -e 'Types: deb\nURIs: https://download.sublimetext.com/\nSuites: apt/stable/\nSigned-By: /etc/apt/keyrings/sublimehq-pub.asc' | sudo tee /etc/apt/sources.list.d/sublime-text.sources

Then running:

sudo apt-get update
sudo apt-get install sublime-text

The installation completed successfully.

Suggestion

It might be helpful to make the repository configuration step more explicit in the installation instructions, as adding the GPG key alone is not sufficient.

Hopefully, this helps anyone running into the same issue!

0 Likes

#2

It might be helpful to make the repository configuration step more explicit in the installation instructions, as adding the GPG key alone is not sufficient.

Running the command from your “solution” is our second instruction in the documentation: https://www.sublimetext.com/docs/linux_repositories.html#apt

0 Likes