Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error message after installing Sublime Text 3

I found on a website that I can install sublime 3 on Fedora 20 using the following command: curl -L http://git.io/3Wr2CQ | sh After running the command I can't open Sublime. I get the following error: /usr/local/bin/subl: line 2: [: ==: unary operator expected

Please see below a copy from the terminal:

    [pc@pc-z710 ~]$ curl -L http://git.io/3Wr2CQ | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100  1065  100  1065    0     0    543      0  0:00:01  0:00:01 --:--:-- 1040k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7300k  100 7300k    0     0  2625k      0  0:00:02  0:00:02 --:--:-- 2625k
[sudo] password for red: 
mv: inter-device move failed: ‘/home/red/sublime_text_3/’ to ‘/opt/sublime_text_3’; unable to remove target: Directory not empty
ln: failed to create symbolic link ‘/bin/subl’: File exists
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  166k  100  166k    0     0   103k      0  0:00:01  0:00:01 --:--:--  103k

Sublime Text 3 installed successfully!
Run with: subl
[pc@pc-z710 ~]$ subl
/usr/local/bin/subl: line 2: [: ==: unary operator expected
[pc@pc-z710 ~]$ uname -m
x86_64
like image 795
maxim Avatar asked Jan 28 '15 01:01

maxim


People also ask

Why my Sublime Text is not working?

There are two main reasons why Sublime Text may become unresponsive: certain plugins are interfering with the program or the cache files are clogging up the program's processes. Removing your programs and reverting Sublime Text to freshly installed state should fix this problem for most users.

How do I install Sublime Text 3 plugins?

Click on the plugin you wish to install. After a few seconds the plugin will be installed and loaded. You will then see an install message with instructions on what you should do to complete the installation. After reading the instructions, restart Sublime Text 3.

Is Sublime Text no longer free?

Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. There is currently no enforced time limit for the evaluation.


1 Answers

Change ${1} into "${1}" so it evaluates to an empty string in shell when no parameter is given.

Also check the location of sublime_text. I had to change path from /usr/local/sublime-text-3/sublime_text to /usr/local/sublime-text-3/sublime_text_3/sublime_text.

like image 86
Huupke Avatar answered Sep 21 '22 03:09

Huupke