1

I saw App Store reporting an upgrade to XCode 8 this morning and unfortunately, took the bait. Now, none of the git CLI commands are working. Tried searching on SO and Google but did not find anything helpful, though I did find recent posts of other issues after upgrading to XCode 8. Getting the same error for any git command - as shown below:

%> git status
dyld: Library not loaded: /usr/local/lib/libwep
  Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
  Reason: no suitable image found.  Did find:
        /usr/local/lib/libwep: mmap() error 1 at address=0x10F0E5000, size=0x0000F000 segment=__TEXT in Segment::map() mapping /usr/local/lib/libwep
        /usr/local/lib/libwep: mmap() error 1 at address=0x10F103000, size=0x0000F000 segment=__TEXT in Segment::map() mapping /usr/local/lib/libwep
git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
git: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch

As it says, /usr/local/lib/libwep does exist but there is an error when trying to load it. Also, the xcodebuild executable also exists at the path printed in the message, i.e. at /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

I also see another xcodebuild at /usr/bin/xcodebuild but / is not accepted as a valid DEVELOPER_DIR value. Some more possibly useful information: I have Github Desktop installed. So I made a change in one of the source files in my Git repo, and Github Desktop showed the local change successfully in its GUI. However, neither git diff nor git status works from the command-line.

I also tried cloning a fresh local repo but git clone throws the same error, too.

3 Answers 3

1

Looks like this is not related to XCode. I found the following after some searching: https://forums.developer.apple.com/thread/7862

So, libwep is used by WebSense, an application that is installed by default on all computers in the corporate environment I am working in. It is meant for security and restricts certain operations. For example, I can not execute any Heroku CLI commands, either, because of it.

What threw me off was that, even with WebSense, I was able to run git CLI commands until last week, but then I also installed a new version of the WebSense client late last week. So it may be the new WebSense version that is now blocking git CLI commands, too. That I installed XCode 8 today could be just a coincidence, or another possibility is that the XCode 8 upgrade in combination with the WebSense client upgrade resulted in this situation.

Anyway, thankfully, Github Desktop still seems to work so I'll just have to use that.

Sign up to request clarification or add additional context in comments.

Comments

1

If you don't develop anything on Xcode just delete Xcode from program files and run git from CLI again. The required tools will be downloaded automatically. No issues.

Comments

-1

I did have the same issue this morning when I tried to use my git. I had to go in and delete the program and reinstall the git client for mac. It started working for me after that.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.