xcode - 在 Ubuntu 上下载 MACOS VMWARE 并运行 Xcode 时遇到的问题

标签 xcode ubuntu vmware qemu solution

我使用 QEMU 系统下载了 macOS。您可以在这里找到完整的教程::https://www.youtube.com/watch?v=p-pJ3qCse20 https://github.com/foxlet/macOS-Simple-KVM

以下是我在 Ubuntu 上下载 macOS 并在 macOS 上运行 Xcode 时遇到的问题

最佳答案

问题1: qemu-system-x86_64:运行./basic.sh时初始化KVM失败:没有这样的文件或目录在终端中

解决方案:BIOS启用虚拟化或者您可以运行sudo chown [username]/dev/kvm在终端 Enabling Virtualization from bios

请注意,安装 Xcode 后,您应该安装 bundlerubycocoapods

问题 2: 在任何源中都找不到正确版本的 cocoapods (1.9.1)

解决方法您使用的cocoapods不兼容,卸载cocoapods并重新安装,cocoapods版本= 1.9.1

问题 3:运行 pod install 时出现错误

[!] Unable to find a specification for `PureLayout (= 3.1.5)`
You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

我尝试运行 pod repo update 或使用 pod install --repo-update 但我也遇到了此错误

Updating local specs repositories
  $ /.cocoapods/repos/cocoapods fetch origin --progress
  remote: Enumerating objects: 41, done.        
  remote: Counting objects: 100% (41/41), done.        
  remote: Compressing objects: 100% (26/26), done.        
  remote: Total 27 (delta 18), reused 0 (delta 0), pack-reused 0        
  From https://github.com/cocoapods/specs
     5c7f45f07ad8..bed8af45c97e  master     -> origin/master
  $ /usr/bin/git -C /Users/nisrine/.cocoapods/repos/cocoapods rev-parse --abbrev-ref HEAD
  fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
  HEAD
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'
[!] CocoaPods was not able to update the `cocoapods` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

运行pod repo update --verbose也不起作用并给出了此错误

/.cocoapods/repos/cocoapods rev-parse --abbrev-ref HEAD
  fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
  HEAD

解决办法:打开vi Gemfile.lock 并将git配置添加到文件中

现在运行bundle exec pod install将正常工作

问题 4: CocoaPods 找不到 pod“Firebase/Performance”的兼容版本

解决方案:运行pod install --repo-update并再次运行bundle exec pod install错误已解决

问题 5:由于运行/build/products/debug-iphonesimulator/umbrella.framework/umbrella 后产生多个命令,模拟器未运行

解决方案:转到"file">“项目/工作区设置” 然后将构建系统更改为旧版构建系统。

enter image description here

关于xcode - 在 Ubuntu 上下载 MACOS VMWARE 并运行 Xcode 时遇到的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63218650/

相关文章:

linux - 无法使用 Linux perf,因为您的 Linux 内核不支持 PERF_COUNT_HW_REF_CPU_CYCLES 事件

regex - 如何从绑定(bind)标量变量的文件输出中过滤特定行?

Powershell - 使用 Export-csv 为多个数组对象创建新行

google-chrome - 在 docker 容器中运行 chrome 问题

apache - 停止我从未启动的服务器?

ios - NSInternalInconsistencyException : bundleURL must be non-nil when not implementing loadSourceForBridge

xcode - 在 React Native 应用程序中为 Fabric crashlytics 日志添加导入文件后,在 Xcode 中找不到 RCTLog.h 文件错误

ios - 适用于 iOS 7.1 的 SKShapeNode 和 swift

iOS 库/框架,如何从构建产品中排除特定类?

shell - 存储 shell 脚本密码的最佳方法是什么?