解决 Sourcetree 报错 Couldn't posix_spawn: error 2 问题

简介: 解决 Sourcetree 报错 Couldn't posix_spawn: error 2 问题

正文


前几天更新到 macOS 12.3 之后,Sourcetree 无法正常打开 Mercurial 的项目,猜测是跟 macOS 12.3 移除了内置的 Python2 有关。报错如下:


1.webp.jpg


在 ATLASSIAN Community 上也能找到相关的帖子,比如这篇:Couldn't posix_spawn: error 2,我也在上面留言了。


5.webp.jpg


其实,打开 Sourcetree 偏好设置可以看到报错原因了:


4.webp.jpg

其中有两个选项,前者意思是「使用内置的 Mercurial」,后者表示「使用系统安装的 Mercurial」。猜测是 Sourcetree 内置的 Mercurial 依赖了 macOS 系统内置的 Python2,但由于系统更新之后已彻底移除,所以就报错了(当前 Sourcetree 最新版本为 4.1.6,仍存在问题,目测后续版本会解决此问题)。


因此,解决思路也很简单,就是使用自行安装的 Mercurial 即可。


Use System Mercurial 处选择路径:/usr/local/Cellar/mercurial/6.1/lib/python3.10/site-packages/mercurial(根据自己安装的 Mercurial 版本及对应路径去选择)。


如果你是通过 Homebrew 安装 Mercurial 的话,可以使用 brew list mercurial 命令查看其路径。


3.webp.jpg


重新打开,就可以了,不再报错。


2.webp.jpg


The end.

目录
相关文章
|
数据库管理
SVN 执行cleanup报错:Cleanup failed to process the following paths : 解决方法
引用:https://www.cnblogs.com/pinpin/p/11395438.html 在SVN更新时提示文件被锁住了,要求执行 clean up操作,执行clean up时又报clean up failed。造成的原因是在某次更新后,点击了cancel按钮,操作没有完成所以会锁住。解决方法如下:
1318 0
JRebel-JVMTI [FATAL] Couldn‘t write to C:\Users\【完美解决方案】
JRebel-JVMTI [FATAL] Couldn‘t write to C:\Users\【完美解决方案】
JRebel-JVMTI [FATAL] Couldn‘t write to C:\Users\【完美解决方案】
|
3月前
|
Linux Python Windows
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
|
3月前
|
缓存 资源调度 JavaScript
Nodejs 命令行调用 exec 与 spawn 差异--- 解决 spawn yarn ENOENT error
Nodejs 命令行调用 exec 与 spawn 差异--- 解决 spawn yarn ENOENT error
|
5月前
|
Unix Docker 容器
使用docker 启动naocs 报错出现:standard_init_linux.go:241: exec user process caused "exec format error"
```markdown Error in Docker container startup: "standard_init_linux.go:241: exec user process caused \"exec format error\"". Occurred at 2024-06-29 09:26:19.910, followed by a failed hook with a syslog delivery error at 09:27:20.193. Seeking solutions from experts. ```
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
|
数据安全/隐私保护
dpkg-buildpackage: error: debian/rules binary subprocess was killed by signal 2
dpkg-buildpackage: error: debian/rules binary subprocess was killed by signal 2
1025 0
|
Unix 应用服务中间件 nginx
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
1001 1
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
|
Python
Pycharm:Couldn't connect to console process.
Pycharm:Couldn't connect to console process.
272 0
Pycharm:Couldn't connect to console process.
|
Linux
LINUX打印机报错:ipp error(1034, client-error-document-format-not-supported)
LINUX打印机报错:ipp error(1034, client-error-document-format-not-supported)
3409 0
LINUX打印机报错:ipp error(1034, client-error-document-format-not-supported)
下一篇
无影云桌面