第一次使用 Ubuntu 并遇到一些错误,希望得到帮助。
安装 Sublime Text 3 的前两个命令可以正常工作:
$ sudo add-apt-repository ppa:webupd8team/sublime-text-3
$ sudo apt-get update
运行此程序时出现错误:
$ sudo apt-get install sublime-text-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
sublime-text-installer is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
linux-headers-3.13.0-36 linux-headers-3.13.0-36-generic
linux-image-3.13.0-32-generic linux-image-3.13.0-36-generic
linux-image-extra-3.13.0-32-generic linux-image-extra-3.13.0-36-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up sublime-text-installer (3083-1~webupd8~0) ...
cp: cannot stat ‘/var/cache/sublime-text/sublime_text_3/*’: No such file or directory
dpkg: error processing package sublime-text-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
sublime-text-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
已确认/var/cache/sublime-text
存在。
cd 进入/var/cache/sublime-text
并看到这个:
sublime_text_3_build_3083_x64.tar.bz2
sublime_text_3
请注意,其中没有目录。
我应该:
mkdir -p /var/cache/sublime-text/sublime_text_3/
并将 放在sublime_text_3_build_3083_x64.tar.bz2
该目录中吗?我的猜测是它正在寻找/var/cache/sublime-text/sublime_text_3/
以便可以运行某个可执行文件(我认为是sublime_text_3_build_3083_x64.tar.bz2
)。
任何反馈都将不胜感激。谢谢。
答案1
- 转到 /var/cache/sublime-text
- bzip2 并解压 sublime_text_3_build_3083_x64.tar.bz2
- 重新运行 apt-get install
- 运行 SublimeText:/usr/bin/subl