14

I have this error when building my project that include several external Frameworks that I have installed using Carthage :

/Users/moneycup/Library/Developer/Xcode/DerivedData/MoneyCup-fawvvvubqmiqrzajrxdwjxeiaxbw/Build/Intermediates/MoneyCup.build/Debug-iphonesimulator/MoneyCup.build/Script-03D74C381DE83AC900F61FEE.sh: line 2: usr/local/bin/carthage: No such file or directory

I have absolutely no clue to what to do now. Thank you in advance for any suggestion.

shallowThought
  • 19,212
  • 9
  • 65
  • 112
user3239711
  • 639
  • 1
  • 7
  • 24
  • I don't know what is causing this problem or how to fix it, but I'd start by Googling for the error message, `usr/local/bin/carthage: No such file or directory` – Pekka Dec 02 '16 at 18:40

2 Answers2

23

You have a build script in your project:

/usr/local/bin/carthage copy-frameworks

(Find it in Build Phases), but Carthage can not be found.

To fix this:

  • Make sure the script has a leading slash (/usr/... not usr/)

If this is not the issue:

shallowThought
  • 19,212
  • 9
  • 65
  • 112
  • Thks. It works to remove the script ! Just for my understanding, what is the purpose of the script ? – user3239711 Dec 07 '16 at 11:48
  • The script works around [an Aplle bug](http://www.openradar.me/radar?id=6409498411401216). I recommend to use the script but to (re-)install Carthage. – shallowThought Dec 07 '16 at 11:53
  • Yes, installing Carthage resolved the issue for me. The script already had the leading slash. –  Jul 20 '18 at 15:19
1

Firstly,

Open Terminal to be sure Carthage's location. Write to Terminal:

open /opt/homebrew/bin

If Carthage is there, great.

Then,

Open your project

Target -> Build Phases -> Run Script - Copy Carthage Dependencies

Location Path should be:

/opt/homebrew/bin/carthage copy-frameworks

Then,

Build your project :)

OguzzYlcn
  • 59
  • 5