1

Recently searched for a newer version of Ubuntu - 17.04. At once, there appeared some strange prolems with him. I'm not a Linux spec, I installed it to teach it anyway; I ask. I do not know how to solve it. Now: I'm trying to install Sublime Text 3. Upgrading to Ubuntu (16.04.2 LTS) I installed it with:

$ sudo add-apt-repository ppa:webupd8team/sublime-text-3
$ sudo apt-get update
$ sudo apt-get install sublime-text-installer

Now when I use the same commands I get errors in the terminal. Here is the log:

dawid4157@lenovo:~$ sudo su root
[sudo] password for dawid4157:
root@lenovo:/home/dawid4157# sudo add-apt-repository ppa:webupd8team/sublime-text-3
Sublime Text 3 Installer: the package in this PPA downloads and installs the latest Sublime Text 3 beta builds.

For more info, see: http://www.webupd8.org/2013/0[...]ubuntu-ppa-now-available.html
More info: https://launchpad.net/~webupd[...]archive/ubuntu/sublime-text-3
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpe9vkcs9v/pubring.gpg' created
gpg: /tmp/tmpe9vkcs9v/trustdb.gpg: trustdb created
gpg: key C2518248EEA14886: public key "Launchpad VLC" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
OK
root@lenovo:/home/dawid4157# sudo apt-get update
Pobieranie:1 http://security.ubuntu.com/ubuntu zesty-security InRelease [89,2 kB]
Stary:2 http://pl.archive.ubuntu.com/ubuntu zesty InRelease
Stary:3 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu zesty InRelease
Stary:4 http://pl.archive.ubuntu.com/ubuntu zesty-updates InRelease
Stary:5 http://pl.archive.ubuntu.com/ubuntu zesty-backports InRelease
Błąd:6 https://download.sublimetext.com apt/dev/ InRelease
Could not resolve host: download.sublimetext.com
Pobrano 89,2 kB w 30s (2918 B/s)
Czytanie list pakietów... Gotowe
W: Nie udało się pobrać https://download.sublimetext.com/apt/dev/InRelease Could not resolve host: download.sublimetext.com
W: Nie udało się pobrać niektórych plików indeksu, zostały one zignorowane lub użyto ich starszej wersji.
root@lenovo:/home/dawid4157# sudo apt-get install sublime-text-installer
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności
Odczyt informacji o stanie... Gotowe
Zostaną zainstalowane następujące NOWE pakiety:
sublime-text-installer
0 aktualizowanych, 1 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
Konieczne pobranie 0 B/9566 B archiwów.
Po tej operacji zostanie dodatkowo użyte 26,6 kB miejsca na dysku.
Prekonfiguracja pakietów ...
(Odczytywanie bazy danych ... 202898 plików i katalogów obecnie zainstalowanych.)
Przygotowywanie do rozpakowania pakietu .../sublime-text-installer_3126-2~webupd8~1_all.deb ...
Downloading...
--2017-07-10 15:09:10-- https://download.sublimetext.[...]text_3_build_3126_x64.tar.bz2
Resolving download.sublimetext.com (download.sublimetext.com)... failed: Name or service not known.
wget: unable to resolve host address ‘download.sublimetext.com’
download failed
Download done.
Removing outdated cached downloads...
sha256sum mismatch sublime_text_3_build_3126_x64.tar.bz2
Sublime Text is NOT installed.
dpkg: błąd przetwarzania archiwum /var/cache/apt/archives/sublime-text-installer_3126-2~webupd8~1_all.deb (--unpack):
podproces nowy skrypt pre-installation zwrócił kod błędu 1
Wystąpiły błędy podczas przetwarzania:
/var/cache/apt/archives/sublime-text-installer_3126-2~webupd8~1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Does anyone have any idea how to fix this? I have permission to opt directory as something.

  • Problem is with the server you download from not with Ubuntu or your setup. I can't reach "download.sublimetext.com" either (wget https://download.sublimetext.com/sublimehq-pub.gpg errors out) – Rinzwind Jul 10 '17 at 13:51
  • So what should you do to install Sublime Text 3? – NinjaMaker Jul 10 '17 at 14:02
  • Wait for the server to come back alive? – Rinzwind Jul 10 '17 at 14:36
4

Instead of using add-apt-repository, you can add the repository's address and key manually by performing the following commands in a root shell. b.t.w. when opening a root shell in Ubuntu or any other Debian based distribution, use the following command

sudo -s

and insert your root password at the prompt.

To add the repository manually, try the following

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
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
  • works fine for me. – endrias Jul 10 '17 at 14:41
  • @ninjamaker does it work for you too now? – Rinzwind Jul 10 '17 at 15:11
  • @Rinzwind Did not work. Same time. I give the log. Additionally, I noticed that I can not normally download from sublime-text page this – NinjaMaker Jul 10 '17 at 15:24
  • I can download each repository. The Atom was downloaded without problems. – NinjaMaker Jul 10 '17 at 15:26
1

After doing sudo add-apt-repository ppa:webupd8team/sublime-text-3

do rm -f /etc/apt/trusted.gpg as quickfix from here

then run:

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

It will ask for confirmation to install it without verification. Once the Debian developers have debugged the problem the issue will be sorted soon.

  • Doing this may break other application updates that rely on gpg – mandragoras Jan 20 '18 at 16:18

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.