Ho appena installato una nuova copia di El Capitan
e come al solito ho iniziato a installare roba ... E improvvisamente ho dovuto affrontare strani problemi. Sto utilizzando Sublime Text
. Fornisce bin
chiamato subl
, che consente di usarlo dalla console. Così ho aggiunto il link ad esso come:
ln -s "/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Ma quando provo a usarlo dalla console ottengo:
MacBook-Pro-Kiril:~ $ subl
-bash: subl: command not found
MacBook-Pro-Kiril:~ $ ls /usr/loca/bin
ls: /usr/loca/bin: No such file or directory
MacBook-Pro-Kiril:~ $ ls /usr/local/bin
brew mongo mongodump mongofiles mongooplog mongorestore mongosniff mongotop npm
bsondump mongod mongoexport mongoimport mongoperf mongos mongostat node subl
MacBook-Pro-Kiril:~ $ ls /usr/local/bin/subl
/usr/local/bin/subl
MacBook-Pro-Kiril:~ $ ls -la /usr/local/bin/subl
lrwxr-xr-x 1 admin 63 Oct 28 19:42 /usr/local/bin/subl -> /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl
MacBook-Pro-Kiril:~ $ mongo
MongoDB shell version: 3.0.7
connecting to: test
2015-10-28T20:22:18.219+0200 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
2015-10-28T20:22:18.221+0200 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
MacBook-Pro-Kiril:~ $ which mongo
/usr/local/bin/mongo
Come puoi vedere altro tufo da /usr/local/bin
funziona bene. Ho anche provato solo per creare una copia di nano e ha funzionato bene ...
MacBook-Pro-Kiril:~ $ nano
MacBook-Pro-Kiril:~ $ which nano
/usr/bin/nano
MacBook-Pro-Kiril:~ $ ln -s /usr/bin/nano /usr/local/bin/nano_2
MacBook-Pro-Kiril:~ $ nano_2
MacBook-Pro-Kiril:~ $ rm /usr/local/bin/nano_2
MacBook-Pro-Kiril:~ $ nano_2
-bash: /usr/local/bin/nano_2: No such file or directory