【问题标题】:sublime text ubuntu installsublime text ubuntu 安装
【发布时间】:2016-08-11 12:53:13
【问题描述】:

我对尝试安装 sublime text 的 ubuntu 完全陌生。关于运行命令

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

我收到了这个错误

soumyadeep@soumyadeep-HP-Pavilion-Notebook:~$ sudo add-apt-repository ppa:webupd8team/sublime-text-3
Traceback (most recent call last):
  File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.5/http/client.py", line 1106, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 1252, in connect
    super().connect()
  File "/usr/lib/python3.5/http/client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.5/socket.py", line 711, in create_connection
    raise err
  File "/usr/lib/python3.5/socket.py", line 702, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 102, in _get_https_content_py3
    lp_page = urllib.request.urlopen(request, cafile=LAUNCHPAD_PPA_CERT)
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 466, in open
    response = self._open(req, data)
  File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
    '_open', req)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 1297, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 327, in get_ppa_info
    ret = get_ppa_info_from_lp(user, ppa)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 92, in get_ppa_info_from_lp
    return get_info_from_lp(lp_url)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 88, in get_info_from_lp
    return _get_https_content_py3(lp_url)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 108, in _get_https_content_py3
    raise PPAException("Error reading %s: %s" % (lp_url, reason), e)
softwareproperties.ppa.PPAException: 'Error reading https://launchpad.net/api/1.0/~webupd8team/+archive/ubuntu/sublime-text-3: [Errno 111] Connection refused'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 393, in shortcut_handler
    return PPAShortcutHandler(shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 356, in __init__
    info = get_ppa_info(self.shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 339, in get_ppa_info
    _get_suggested_ppa_message(user, ppa))
softwareproperties.shortcuts.ShortcutException: Cannot add PPA: 'ppa:~webupd8team/ubuntu/sublime-text-3'.
ERROR: '~webupd8team' user or team does not exist.
Error: 'ppa:webupd8team/sublime-text-3' invalid

请帮忙。

【问题讨论】:

  • 您是否考虑过从sublimetext.com/3 下载.deb 文件并安装它而不是使用PPA?
  • 是的,我已经完成了,但由于某种原因安装开始并在几秒钟后停止
  • edit您的问题并在包含下载的.deb文件的目录中运行sudo dpkg -i sublime-text_build-3114_amd64.deb的完整输出。这是在 Ubuntu 上安装 Sublime 的首选方式,因为它会在准备好安装新版本时自动为您提供更新消息。
  • @MattDMo 我在添加存储库时遇到了同样的问题。我有 x86_64 架构 amd64 构建可以在 ubuntu 中使用吗?
  • @AdityaGuru 是的,x86_64 与 amd64 相同。

标签: linux ubuntu sublimetext3


【解决方案1】:

有时我们在 Ubuntu 机器上安装 sublime 时会遇到麻烦。

注意 - 如果您以前安装过 Sublime,请完全卸载。

Here is steps 安装在新的 Ubuntu 机器上-

第 1 步:打开终端

第 2 步:wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

第 3 步:echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

第四步:sudo apt-get update

第 5 步:sudo apt-get install sublime-text

我使用这些步骤安装,希望对你有用!!!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-18
    • 1970-01-01
    • 2013-09-05
    • 2015-06-14
    相关资源
    最近更新 更多