简体   繁体   English

如何在Ubuntu 12.04上更新Sublime Text 2?

[英]How to update Sublime Text 2 on Ubuntu 12.04?

I'm trying to update Sublime Text 2 on Ubuntu 12.04 and I'm using the webupd8team repository, but my old install of Sublime is not getting overwritten. 我正在尝试更新Ubuntu 12.04上的Sublime Text 2,我正在使用webupd8team存储库,但是我的旧版Sublime没有被覆盖。 So I end up with Sublime Text 2.0.1 and 2.0.2 installed. 所以我最终安装了Sublime Text 2.0.1和2.0.2。 When I run sudo apt-get remove sublime-text* it only uninstalls the 2.0.2 version. 当我运行sudo apt-get remove sublime-text *时,它只卸载2.0.2版本。 How can I either uninstall the 2.0.1 version or update so that it overwrites it with 2.0.2? 如何卸载2.0.1版本或更新以便用2.0.2覆盖它? Thanks in advance. 提前致谢。

I also ran across this issue and found a 3rd party repo. 我也碰到了这个问题并找到了第三方回购。 This updated and installed the newest version of sublimetext 2.0.2 flawlessly. 这更新并安装了最新版本的sublimetext 2.0.2完美无瑕。 I am posting the directions here but please take the time to read all the documentation as things might have changed since this post. 我在这里发布了指示,但请花时间阅读所有文档,因为这篇文章可能已经发生了变化。

http://www.ubuntuupdates.org/ppa/sublime http://www.ubuntuupdates.org/ppa/sublime

Check your ubuntu version first. 首先检查你的ubuntu版本。 This repository is ONLY for: Natty Oneiric Precise Quantal Raring 此存储库仅适用于:Natty Oneiric Precise Quantal Raring

lsb_release -a

To install this PPA: 要安装此PPA:

sudo add-apt-repository ppa:webupd8team/sublime-text-2 
sudo apt-get update
sudo apt-get install sublime-text

There is a PPA for Sublime Text 2: Sublime Text 2有一个PPA:

https://launchpad.net/~webupd8team/+archive/sublime-text-2 https://launchpad.net/~webupd8team/+archive/sublime-text-2

But remember, that you will be integrating a new third-party-repository into your system. 但请记住,您将在系统中集成新的第三方存储库。

This is what I experienced, I had also installed Sublime with the webup8team ppa. 这就是我所经历的,我也使用webup8team ppa安装了Sublime。 Pre "Build 2221", the ppa installed sublime text at: /usr/lib/sublime-text-2/ , it then added a bash file launcher: /usr/bin/sublime-text to start Sublime. 预备“Build 2221”,ppa安装了sublime文本: / usr / lib / sublime-text-2 / ,然后添加了一个bash文件启动器: / usr / bin / sublime-text来启动Sublime。 I recently updated Sublime to "Build 2221". 我最近将Sublime更新为“Build 2221”。 It was installed at /opt/sublime_text_2/ . 它安装在/ opt / sublime_text_2 / However, the launcher was not updated to point to the new location. 但是,启动器未更新为指向新位置。 Which is probably the discrepancy you have experienced. 这可能是您遇到的差异。 Here is how I fixed on my setup: 以下是我修复设置的方法:

Edit the bash file launchers (I'm not sure which one is the right one for you, so edit both to be safe) 编辑bash文件启动器(我不确定哪一个适合您,所以编辑两者都是安全的)

gedit /usr/bin/sublime-text
gedit /usr/bin/subl

Update the location 更新位置

#!/bin/bash

/opt/sublime_text_2/sublime_text --class=sublime-text-2 "$@"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM