越狱手机运行程序退出: Killed: 9

本文针对越狱手机上运行的应用程序出现“Killed:9”错误的问题提供了多种解决方案,包括调整签名证书、修改二进制文件架构、重新部署应用等方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

越狱手机运行程序退出: Killed: 9

这种情况一般是由于签名问题

解决方法1(不推荐):

不使用苹果证书,而是:

  1. 创建自己的代码签名证书
  2. 修改XCODE环境
  3. 修改工程属性添加Build Phase

这样即可解决,详细参见:免证书开发……

------

解决方法2:

另外一种情况:编译的二进制程序在iPhone4上正常运行,在iPhone3GS上出现Killed: 9。

后来尝试使用免证书模式,同样问题,使用ldid -S pro也会出现_asset问题。

最后,新建一个Empty App工程(白屏工程),删除所有.m和.h,将先前工程中的.m和.h复制添加进来,设置标准签名证书,解决!

注意其中出现了一个问题:提示provisioning中不包含这个bundle identifier(其实应该是包含的),编译不过;后来发现,应该在Project->Build Settings->Code Signing中设置正确的开发者证书,然后还要在TARGETS->Build Settings->Code Signing中设置为iPhone Developer(并让Xcode自动显示灰色的(currently matches ….)),就可以了。

-----

解决方法3:

还有一种情况:

删掉手机文件,再上传(不要直接覆盖),运行即可成功

-----

解决方法4:

在mac上先进行ldid -S 删除证书操作,再传到ios上就可以了

解决方法5:

1) Using ldid -S is the correct usage. Not lowercase, as Lois says.

2) Usually, when I get this error, it's because I built my app with the wrong architectures. Most versions ofldid that I've used cannot sign fat binaries. Fat binaries are ones with more than one architecture inside. For example, a dual armv6 and armv7 executable. Or with Xcode 4.5, it's probably defaulting to arvm7and armv7s.

In the project build settings, use the ArchitecturesValid Architectures and Build Active Architecture Onlysettings to determine which architecture executable is built. For jailbreak development, I usually set Build Active Architecture Only to YES. And valid archictures set to armv6 and armv7.

3) Also, some older versions of ldid cannot sign armv7 executables. If you get the pre-built copy from KennyTM's site here, it supports armv7. Note that this ldid is built for Mac OS X, so it's designed to be run on the executable on your Mac, after building without signing in Xcode, but before you upload to your iPhone.

Newer phones can generally run executables built for older architectures, but not the other way around. So, build for the oldest architecture you want to support. You just will lose some optimizations in the newer architectures (which most people don't care too much about ... let me know if your app needs these optimizations, and I'll post more).

So, if you want to support old devices (iPhone < 3GS), I would set Architectures to onlyarmv6, making sure to remove the default setting of $(ARCHS_STANDARD_32_BIT). If you only need support for relatively new ones, then pick armv7, but make sure you use a version of ldid that can sign armv7 binaries.

Edit: to determine if the executable you were trying to sign was a fat one, run this at the command line:

> cd HelloJB.app

> ls

HelloJB     Info.plist  PkgInfo     date.zip    en.lproj

> lipo -info HelloJB 

Non-fat file: HelloJB is architecture: armv7

As you can see in the above output, my HelloJB executable is not fat, and only has armv7 code.

### ZSH会话被终止的原因 当遇到`zsh: killed xxx/bin/python`错误时,通常意味着Python进程因资源不足或其他系统级限制而被迫结束。具体来说: - 进程可能因为内存耗尽或超出分配给用户的最大线程数/进程数而导致被操作系统杀死[^1]。 - 如果在同一时间运行过多的任务,特别是长时间占用大量CPU或内存的应用程序,则可能会触发操作系统的保护机制来防止整个系统变得不稳定。 对于Mac环境中报告的`fork failed: resource temporarily unavailable`问题,这表明尝试创建新子进程失败了,通常是由于达到了当前用户可拥有的活动进程数量上限所致[^3]。 ### 解决方案概述 为了有效处理上述情况,可以采取以下措施之一或多者组合的方式解决问题: #### 方法一:增加可用资源 如果是因为物理内存不够引起的问题,考虑升级硬件配置;如果是虚拟机环境则调整其设置以获得更多RAM支持。 #### 方法二:优化现有资源配置 减少不必要的后台服务和应用程序的数量,释放更多计算能力供目标应用使用。可以通过命令行工具监控并管理正在运行的服务: ```bash ps -ef | grep python # 查看所有与Python有关的进程 killall python # 终止所有Python实例(谨慎操作) ``` 针对特定场景下存在的大量cron作业影响性能的现象,建议定期清理不再需要的任务计划,并合理规划定时任务的时间间隔以免造成瞬时负载过高。 #### 方法三:修改内核参数 适当提高单个用户所能启动的最大进程数目限额,在Linux/MacOS上可通过编辑/etc/security/limits.conf文件实现此目的。例如添加如下条目: ```text * soft nproc 4096 * hard nproc 8192 ``` 重启计算机使更改生效前记得保存重要数据以防万一。 #### 方法四:重新构建软件包 考虑到某些情况下预编译版本可能存在兼容性缺陷或是出于安全考量希望获得更纯净无污染的执行环境,可以从官方仓库获取最新源码自行编译安装所需的库及其依赖项。注意遵循官方文档指导完成相应步骤,确保最终产物经过正确签名验证后再投入使用[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值