/ usr / bin / env: intérprete incorreto: Operação não permitida

1

encontrou algumas respostas aqui que não me ajudaram muito

ohad@Macintosh-2:/Volumes/develpment/global_constants (master *+)$ node_modules/.bin/mocha -w
bash: node_modules/.bin/mocha: /bin/csh: bad interpreter: Operation not permitted

o arquivo é

cat node_modules/.bin/mocha
#!/usr/bin/env node

/**
 * This tiny wrapper file checks for known node flags and appends them

Isso acontece não apenas aqui, mas toda vez que eu tento executar uma festa da minha comp. Eu sou novo para bater e não tão familiarizado com o Linux, alguém pode ajudar?

Editar: Estou usando o Osx. Eu tentei

find ~ -exec xattr -d com.apple.quarantine {} 2> /dev/null \;

ainda está em execução ..

tentou editar e remover todas as coisas do meu .bash_profile

export PROMPT_COMMAND='echo -ne "3]0;${PWD##*/}
ohad@Macintosh-2:/Volumes/develpment/global_constants (master *+)$ node_modules/.bin/mocha -w
bash: node_modules/.bin/mocha: /bin/csh: bad interpreter: Operation not permitted
7"' [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Textmate's ruby export TM_RUBY=rvm-auto-ruby export PATH="/usr/local/bin:/usr/local/sbin:/opt/local/bin/:/usr/local/mysql-5.1.58-osx10.6-x86_64/bin:$PATH" #export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH" export JAVA_HOME=/Library/Java/Home export PATH=/opt/local/bin:/opt/local/sbin:$PATH export LC_CTYPE="en_US.UTF-8" export LC_ALL="en_US.UTF-8" export GEM_EDITOR='mate' export VBOX_IP="127.0.0.1" PATH=$PATH:/usr/local/sbin bind 'set completion-ignore-case on' # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi source ~/.git-completion.bash # User specific environment and startup programs function crc32 { cksum -o3 "$@"|ruby -e 'STDIN.each{|a|a=a.split;printf "%08X\t%s\n",a[0],a[2..-1].join(" ")}'; } #required to get X11 working right (for ssh -X and gtk) export DISPLAY=:0 #git source ~/.git-completion.bash GIT_PS1_SHOWDIRTYSTATE=true #modified (colourised) prompt #export PS1='\h:\w \e[31m\u\e[0m$' #export PS1='[\t] \h:\w \u\$ ' #export PS1='\u@\h:\w \$ ' #git-bash # export PS1='\[3[01;32m\]\u@\h\[3[00m\]:\[3[01;34m\]\w\[3[00m\]\$ ' export PS1='\[3[32m\]\u@\h\[3[00m\]:\[3[34m\]\w\[3[31m\]$(__git_ps1)\[3[00m\]\$ ' # ls aliases # colors that "ls" uses. export CLICOLOR=1 #export LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jpg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.png=01;35:*.mpg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:" #export LS_COLORS='no=00:fi=00:di=01;34:ln=01;43;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32;41:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jpg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.png=01;35:*.mpg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:' LS_COLORS='' LS_COLORS=$LS_COLORS:'no=0' # Normal text LS_COLORS=$LS_COLORS:'fi=0' # Regular file LS_COLORS=$LS_COLORS:'di=36' # Directory LS_COLORS=$LS_COLORS:'ln=01;36' # Symbolic link LS_COLORS=$LS_COLORS:'pi=33' # Named pipe LS_COLORS=$LS_COLORS:'so=01;35' # Socket LS_COLORS=$LS_COLORS:'do=01;35' # DO LS_COLORS=$LS_COLORS:'bd=01;37' # Block device LS_COLORS=$LS_COLORS:'cd=01;37' # Character device LS_COLORS=$LS_COLORS:'ex=35' # Executable file LS_COLORS=$LS_COLORS:'*FAQ=31;7' # FAQs LS_COLORS=$LS_COLORS:'*README=31;7' # READMEs LS_COLORS=$LS_COLORS:'*INSTALL=31;7' # INSTALLs LS_COLORS=$LS_COLORS:'*.sh=47;31' # Shell-Scripts LS_COLORS=$LS_COLORS:'*.vim=35' # Vim-"Scripts" LS_COLORS=$LS_COLORS:'*.swp=00;44;37' # Swapfiles (Vim) LS_COLORS=$LS_COLORS:'*.sl=30;33' # Slang-Scripts LS_COLORS=$LS_COLORS:'*,v=5;34;93' # Versioncontrols LS_COLORS=$LS_COLORS:'or=01;05;31' # Orphaned link LS_COLORS=$LS_COLORS:'*.c=33' # Sources LS_COLORS=$LS_COLORS:'*.C=33' # Sources LS_COLORS=$LS_COLORS:'*.h=33' # Sources LS_COLORS=$LS_COLORS:'*.cc=33' # Sources LS_COLORS=$LS_COLORS:'*.py=33' # Sources LS_COLORS=$LS_COLORS:'*.rb=33' # Sources LS_COLORS=$LS_COLORS:'*.awk=33' # Sources LS_COLORS=$LS_COLORS:'*.pl=33' # Sources LS_COLORS=$LS_COLORS:'*.jpg=0;32' # Images LS_COLORS=$LS_COLORS:'*.jpeg=0;32' # Images LS_COLORS=$LS_COLORS:'*.JPG=0;32' # Images LS_COLORS=$LS_COLORS:'*.gif=0;32' # Images LS_COLORS=$LS_COLORS:'*.png=0;32' # Images LS_COLORS=$LS_COLORS:'*.jpeg=0;32' # Images LS_COLORS=$LS_COLORS:'*.ppm=0;32' # Images LS_COLORS=$LS_COLORS:'*.pgm=0;32' # Images LS_COLORS=$LS_COLORS:'*.pbm=0;32' # Images LS_COLORS=$LS_COLORS:'*.tar=31' # Archive LS_COLORS=$LS_COLORS:'*.tgz=31' # Archive LS_COLORS=$LS_COLORS:'*.gz=31' # Archive LS_COLORS=$LS_COLORS:'*.zip=31' # Archive LS_COLORS=$LS_COLORS:'*.sit=31' # Archive LS_COLORS=$LS_COLORS:'*.lha=31' # Archive LS_COLORS=$LS_COLORS:'*.lzh=31' # Archive LS_COLORS=$LS_COLORS:'*.rar=31' # Archive LS_COLORS=$LS_COLORS:'*.arj=31' # Archive LS_COLORS=$LS_COLORS:'*.bz2=31' # Archive LS_COLORS=$LS_COLORS:'*.avi=35' # Video LS_COLORS=$LS_COLORS:'*.mpg=35' # Video LS_COLORS=$LS_COLORS:'*.mpeg=35' # Video LS_COLORS=$LS_COLORS:'*.divx=35' # Video LS_COLORS=$LS_COLORS:'*.xvid=35' # Video LS_COLORS=$LS_COLORS:'*.mov=35' # Video LS_COLORS=$LS_COLORS:'*.mp4=35' # Video LS_COLORS=$LS_COLORS:'*.m4v=35' # Video LS_COLORS=$LS_COLORS:'*.wmv=35' # VIdeo LS_COLORS=$LS_COLORS:'*.mp3=37' # Audio LS_COLORS=$LS_COLORS:'*.ogg=37' # Audio LS_COLORS=$LS_COLORS:'*.wav=37' # Audio LS_COLORS=$LS_COLORS:'*.au=37' # Audio LS_COLORS=$LS_COLORS:'*.html=36' # HTML LS_COLORS=$LS_COLORS:'*.htm=1;34' # HTML LS_COLORS=$LS_COLORS:'*.php=1;45' # PHP LS_COLORS=$LS_COLORS:'*.doc=1;34' # MS-Word LS_COLORS=$LS_COLORS:'*.txt=1;34' # Plain/Text LS_COLORS=$LS_COLORS:'*.o=1;36' # Object-Files LS_COLORS=$LS_COLORS:'*.a=1;36' # Shared-libs export LS_COLORS export PATH=/opt/local/bin:/opt/local/sbin:$PATH clean(){ #various commands to clean files that are weirdly changed. echo "running git checkout Gemfile.lock " git checkout Gemfile.lock echo "running rm dump.rdb " rm dump.rdb echo "Done cleaning" } cl(){ clean } startup(){ #start up commands echo "redis" sudo redis-server echo "mongo" sudo mongod echo "rabbit" rabbitmq-server } st(){ startup } if [ -f 'brew --prefix'/etc/bash_completion ]; then . 'brew --prefix'/etc/bash_completion fi if [ -f ~/bash_completion.d/knife ]; then . ~/bash_completion.d/knife fi [ -s "/Users/ohad/.nvm/nvm.sh" ] && . "/Users/ohad/.nvm/nvm.sh" # This loads nvm
    
por WebQube 30.04.2014 / 17:30

2 respostas

1

"Operação não permitida"

Às vezes, "Oprovação proibida" significa que você está tentando abrir um arquivo executável que não é.

Você pode usar sudo chmod +x yourfile

Você tentou como usuário root ? sudo yourcommand

Por alguns motivos, quando uso o sudo, nem sempre funciona.

Então você pode tentar sudo su .

Se você não estiver no arquivo sudoers, basta adicionar você com su , em seguida, visudo .

    
por 30.04.2014 / 17:40
0

Acho que você estava no caminho certo com o comando xattr . Esta questão fornece uma explicação:

Did you happen to open/save the file in TextEdit?

That can introduce filesystem metadata (quarantine attribute) leading to the symptom you describe.

O comando que você executou:

find ~ -exec xattr -d com.apple.quarantine {} 2> /dev/null \;

Somente removerá o atributo de quarentena nos arquivos abaixo do seu diretório pessoal ( ~ ). Você deveria tentar:

xattr -d com.apple.quarantine /Volumes/develpment/global_constants/node_modules/.bin/mocha

E / ou substitua ~ no seu comando original por um dos diretórios principais do (s) script (s) que você está com problemas para executar.

    
por 30.04.2014 / 20:07