设置完 Sublime Text 2 后,我尝试安装包控制,但遇到了错误。然后每次打开 Sublime Text 2 时,都会出现错误:
Unable to run package setup:
Traceback (most recent call last):
File "./PackageSetup.py", line 165, in upgrade
upgradePackage(pkg, pristinedir, datadir, backupdir)
File "./PackageSetup.py", line 158, in upgradePackage
os.path.join(backupdir, base), inhibitOverwrite)
File "./PackageSetup.py", line 90, in upgradeArchive
writeFile(fname, newar.read(f))
File "./PackageSetup.py", line 18, in writeFile
with open(fname, 'wb') as fo:
IOError: [Errno 2] No such file or directory: u'/home/halink/.config/sublime-text-2/Packages/Package Control/package_control/preferences_filename.py'
有人能告诉我如何修复它或者如何删除 Sublime Text 并且我可以重新安装它吗?
答案1
您可能能够简单地恢复到刚刚安装的状态。
Linux: ~/.config/sublime-text-2
恢复到新安装状态, 你可以:
Exit Sublime Text 2
Delete (or move) the data folder, as listed above
Start Sublime Text 2
重新启动后,将会创建一个新的数据文件夹,就像您第一次运行 Sublime Text 2 一样。请记住,这还将删除您可能已安装的所有设置和软件包。
来源:http://www.sublimetext.com/docs/2/revert.html
如果您想卸载它,这里有一个如何安装/卸载的示例
打开终端并使用以下命令安装Sublime Text 2 编辑器:
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
如何卸载Sublime Text 2 编辑器:
sudo apt-get remove sublime-text
sudo add-apt-repository --remove ppa:webupd8team/sublime-text-2
sudo apt-get update
来源:http://itsfoss.com/how-to-easily-install-sublime-text-2-editor-in-ubuntu/