Could not find path to Xcode by symlinks located i

2019-07-25 17:53发布

问题:

I am trying to setup appium for ios app testing using php, but when I am tring to execute test scripts

vendor/phpunit/phpunit/phpunit SimpleTest.php --verbose

I am getting this error:

PHPUnit_Extensions_Selenium2TestCase_WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not find path to Xcode by symlinks located in /var/db/xcode_select_link, or /usr/share/xcode-select/xcode_dir_link"

Tried this sudo xcode-select --switch /Applications/Xcode.app but that didn't work.

回答1:

As already mention in this post:where-does-xcode-select-store-information The comment from 0x1mason helped me in my case with 2 Xcode-Versions. I used the following commands in Terminal:

  1. readlink /var/db/xcode_select_link --> Checked the path
  2. xcode-select --reset
  3. restart MacOS
  4. checked again with readlink /var/db/xcode_select_link in Terminal

Hope it helps you too.