2015-07-13 15 views
34

के साथ समस्या node.js स्थापित करें मैं होमब्री के साथ नोड.जेएस स्थापित करने की कोशिश कर रहा हूं (मैंने ब्रू का उपयोग किए बिना इसे पहले स्थापित किया है, और मैंने उन सभी फ़ाइलों को हटाने का प्रयास किया है)। मैंने पिछले प्रश्नों को समान प्रश्न पूछने पर देखा है, लेकिन मैं उन्हें काम करने में सक्षम नहीं हूं।होमब्री

[email protected]:~$ brew link node 
Linking /usr/local/Cellar/node/0.12.6... 
Error: Could not symlink share/systemtap/tapset/node.stp 
Target /usr/local/share/systemtap/tapset/node.stp 
already exists. You may want to remove it: 
    rm '/usr/local/share/systemtap/tapset/node.stp' 

To force the link and overwrite all conflicting files: 
    brew link --overwrite node 

To list all files that would be deleted: 
    brew link --overwrite --dry-run node 

और फिर जब मैं brew link --overwrite node चलाने मैं निम्नलिखित मिल:

[email protected]:~$ brew link --overwrite node 
Linking /usr/local/Cellar/node/0.12.6... 
Error: Could not symlink share/systemtap/tapset/node.stp 
/usr/local/share/systemtap/tapset is not writable. 

साथ ही, जब मैं brew link -n node का उपयोग करके फ़ाइलें खोजने के लिए मैन्युअल रूप से हटाने का प्रयास है, मैं करने में कामयाब रहे सबसे पहले मैं brew link node जो मुझे दिया करने की कोशिश की उनमें से कुछ को हटा दें, लेकिन मैं अभी भी निम्न फ़ाइलें है कि मैं नहीं हटा सकते हैं के साथ छोड़ दिया है:

[email protected]:~$ brew link -n node 
Would link: 
/usr/local/etc/bash_completion.d/npm 
/usr/local/bin/node 
/usr/local/include/node 
/usr/local/share/man/man1/node.1 
/usr/local/share/systemtap/tapset/node.stp 
/usr/local/lib/dtrace/node.d 

जब मैं कोशिश मैं followin मिल नष्ट करने के लिए ग्राम (इन फ़ाइलों के सभी के लिए एक ही बात):

[email protected]:~$ rm /usr/local/etc/bash_completion.d/npm 
rm: /usr/local/etc/bash_completion.d/npm: No such file or directory 

मुझे क्या करना चाहिए?

+0

आप ब्रू का उपयोग क्यों करना चाहते हैं? – Qualcuno

उत्तर

67

ऐसा हो सकता है कि आप वास्तव में अपनी systemtap निर्देशिका का स्वामी न हों। /usr/local/share पर नेविगेट करें और अपने आप को मालिक बनाने के लिए आदेश में यह कमांड चलाएँ:

chown -R <yourusername>:<yourgroupname> systemtap 

जब मैं आज पहले यह एक ही समस्या का समाधान किया गया था, मैं भी /usr/local में जाने और lib निर्देशिका के लिए एक ही बात करना था।

+0

यह मेरे लिए काम किया। धन्यवाद! – buschschwick

+2

"सूडो" के बारे में मत भूलना। सुडो चाउन -आर : systemtap – 1nstinct

+29

"सुडो चाउन -आर $ (व्हामी)/usr/local/share/systemtap" मेरे लिए काम किया – kequc

10

या, वैकल्पिक रूप से,

$ ls -al /usr/local/share/systemtap/ 
drwxr-xr-x 3 root wheel 102 Oct 23 18:06 . 
drwxrwxr-x 15 root wheel 510 Oct 24 20:24 .. 
drwxr-xr-x 2 root wheel 68 Oct 24 20:17 tapset 

तो स्वामित्व और systemtap पर अनुमतियों की पुष्टि स्वामी समूह के लिए अपने आप को जोड़ (इस मामले पहिया में)

sudo dscl . append /Groups/wheel GroupMembership <username> 

तो अनुमति देने के लिए टेपसेट पर अनुमतियां परिवर्तित समूह संपादित करता

sudo chmod -R 775 /usr/local/share/systemtap/tapset/ 
2
arun:~$ brew link node 
Linking /usr/local/Cellar/node/0.12.6... 
Error: Could not symlink share/systemtap/tapset/node.stp 
Target /usr/local/share/systemtap/tapset/node.stp 
already exists. You may want to remove it: 
    rm '/usr/local/share/systemtap/tapset/node.stp' 
,210

भागो नीचे आदेशों

brew postinstall node -v 
brew link node 
+0

मेरे लिए काम नहीं कर रहा है :( –

1

क्या मेरे लिए काम किया: (भी किया 1 के लिए)

  1. cd /usr/local/share
  2. sudo chown -R <user>:<group> systemtap

चरणों से ऊपर में नाकाम रहने के थे। अगले जवाब के लिए गया था। कोशिश की;

ls -al /usr/local/share/systemtap/ जो 'त्रुटि नहीं मिली' फेंक दिया।

फिर: brew link node एक त्रुटि फेंक रहा था।तो मैंने किया:

  1. sudo rm -rf /usr/local/lib/node_modules
  2. brew postinstall node -v
  3. और आखिरी brew link node
  4. node -v :)

पर तो बुनियादी तौर पर मैं सभी node_modules/ फ़ोल्डरों निकाल दिया और redid सब कुछ।

संबंधित मुद्दे