Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when I built my app in xcode,there is an error:/bin/sh: bad interpreter: Operation not permitted

the error information:

/Users/baymac/Library/Developer/Xcode/DerivedData/Accelerometer_Nodes-ccicmwcpsbuvnnfllupzhsbpxwrr/Build/Intermediates/Accelerometer Nodes.build/Debug-iphoneos/Accelerometer Nodes.build/Script-2C82A787FAD9698819CAEFB4.sh: /Users/baymac/Documents/patrick lab/ios project/DeviceToPhone/Pods/Target Support Files/Pods/Pods-frameworks.sh: /bin/sh: bad interpreter: Operation not permitted Command /bin/sh failed with exit code 126

I have tried pods install or chmod,they are useless,it would be so nice if any one can help me!!

like image 478
Feihua Fang Avatar asked Jul 21 '16 07:07

Feihua Fang


3 Answers

if install pods is useless,maybe you can find the path of the file with error,for example,my path is /Users/baymac/Documents/patrick lab/ios project/DeviceToPhone/Pods/Target Support Files/Pods/Pods-frameworks.sh

then you can use this instruct: xattr -d com.apple.quarantine+ your path,for example:

xattr -d com.apple.quarantine /Users/baymac/Documents/patrick lab/ios project/DeviceToPhone/Pods/Target Support Files/Pods/Pods-frameworks.sh

make sure your path is right.

and my problem is fixed!

like image 84
Feihua Fang Avatar answered Nov 04 '22 19:11

Feihua Fang


Try to remove .xcworkspace and Podfile.lock files also remove folder Pod

then open terminal type cd put path of your project root folder press enter type pod install or pod update press enter

like image 12
Rahul Patel Avatar answered Nov 04 '22 19:11

Rahul Patel


I faced same issue.

Reason: If you download project from internet, executable .sh files will be quarantined, and system doesn't allow them to execute.

Cure: You should remove extended attributes to make these executables work.

In terminal

xattr -rc directory_where_executables_located

this will recursively remove extended attributes from files in directory_where_executables_located

like image 7
NMaks Avatar answered Nov 04 '22 19:11

NMaks