/usr/bin/codesign failed with exit code 1

本文解决了一次在真机调试时遇到的问题,即重新申请证书后仍出现错误的情况。最终发现,问题出在Keychain Access中Apple WWDR证书被标记为AlwaysTrust,而非正确的SystemDefaults。通过更正这一设置,问题得以解决。

在进行真机调试的时候,出现这个问题,重新进行一系列的申请证书等,还是报错,最后解决问题如下:

 

I had the exact same error, and tried everything under the sun, including what was elsewhere on this page, with no success. What the problem was for me was that in Keychain Access, the actual Apple WWDR certificate was marked as "Always Trust". It needed to be "System Defaults". That goes for your Development and Distribution certificates, too. If any of them are incorrectly set to "Always Trust", that can apparently cause this problem.

So, in Keychain Access, click on the Apple Worldwide Developer Relations Certificate Authority certificate, select Get Info. Then, expand the Trust settings, and for the combo box for "When using this certificate:", choose "System Defaults".

(type) lenovo@lenovo-ThinkStation-P2-Tower:/media/lenovo/E676335D76332E25/SCLC_rna-seq/tumor/HLAtype$ sudo apt-get install parallel [sudo] lenovo 的密码: 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: linux-hwe-6.11-tools-6.11.0-25 linux-tools-6.11.0-25-generic 使用'sudo apt autoremove'来卸载它(它们)。 建议安装: csh fish ksh tcsh zsh 下列【新】软件包将被安装: parallel 升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 1 个软件包未被升级。 有 2 个软件包没有被完全安装或卸载。 需要下载 1,944 kB 的归档。 解压缩后会消耗 3,067 kB 的额外空间。 获取:1 http://archive.ubuntu.com/ubuntu noble/universe amd64 parallel all 20231122+ds-1 [1,944 kB] 已下载 1,944 kB,耗时 2秒 (805 kB/s) 正在选中未选择的软件包 parallel。 (正在读取数据库 ... 系统当前共安装有 255728 个文件和目录。) 准备解压 .../parallel_20231122+ds-1_all.deb ... 正在添加 通过 parallel 从 /usr/bin/parallel 到 /usr/bin/parallel.moreutils 的转移 正在添加 通过 parallel 从 /usr/share/man/man1/parallel.1.gz 到 /usr/share/man/man1/parallel.moreutils.1.gz 的转移 正在解压 parallel (20231122+ds-1) ... 正在设置 nvidia-dkms-550 (550.144.03-0ubuntu0.24.04.1) ... update-initramfs: deferring update (trigger activated) update-initramfs: Generating /boot/initrd.img-6.14.0-28-generic INFO:Enable nvidia DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here Removing old nvidia-550.144.03 DKMS files... Deleting module nvidia-550.144.03 completely from the DKMS tree. Loading new nvidia-550.144.03 DKMS files... Building for 6.14.0-28-generic 6.14.0-29-generic Building for architecture x86_64 Building initial module for 6.14.0-28-generic ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-kernel-source-550.0.crash' Error! Bad return status for module build on kernel: 6.14.0-28-generic (x86_64) Consult /var/lib/dkms/nvidia/550.144.03/build/make.log for more information. dpkg: 处理软件包 nvidia-dkms-550 (--configure)时出错: 已安装 nvidia-dkms-550 软件包 post-installation 脚本 子进程返回错误状态 10 正在设置 linux-image-6.14.0-29-generic (6.14.0-29.29~24.04.1) ... 正在设置 parallel (20231122+ds-1) ... 正在处理用于 man-db (2.12.0-4build2) 的触发器 ... 正在处理用于 initramfs-tools (0.142ubuntu25.4) 的触发器 ... update-initramfs: Generating /boot/initrd.img-6.14.0-28-generic 正在处理用于 linux-image-6.14.0-29-generic (6.14.0-29.29~24.04.1) 的触发器 ... /etc/kernel/postinst.d/dkms: * dkms: running auto installation service for kernel 6.14.0-29-generic Sign command: /usr/bin/kmodsign Signing key: /var/lib/shim-signed/mok/MOK.priv Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der Building module: Cleaning build area... unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j16 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.14.0-29-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/6.14.0-29-generic/build LD=/usr/bin/ld.bfd CONFIG_X86_KERNEL_IBT= modules.........(bad exit status: 2) ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-kernel-source-550.0.crash' Error! Bad return status for module build on kernel: 6.14.0-29-generic (x86_64) Consult /var/lib/dkms/nvidia/550.144.03/build/make.log for more information. dkms autoinstall on 6.14.0-29-generic/x86_64 failed for nvidia(10) Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. * dkms: autoinstall for kernel 6.14.0-29-generic ...fail! run-parts: /etc/kernel/postinst.d/dkms exited with return code 11 dpkg: 处理软件包 linux-image-6.14.0-29-generic (--configure)时出错: 已安装 linux-image-6.14.0-29-generic 软件包 post-installation 脚本 子进程返回错误状态 11 在处理时有错误发生: nvidia-dkms-550 linux-image-6.14.0-29-generic E: Sub-process /usr/bin/dpkg returned an error code (1)
09-03
(type) lenovo@lenovo-ThinkStation-P2-Tower:/media/lenovo/E676335D76332E25/SCLC_rna-seq/tumor/HLAtype$ sudo apt --fix-broken install 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: linux-hwe-6.11-tools-6.11.0-25 linux-tools-6.11.0-25-generic 使用'sudo apt autoremove'来卸载它(它们)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 1 个软件包未被升级。 有 2 个软件包没有被完全安装或卸载。 解压缩后会消耗 0 B 的额外空间。 正在设置 nvidia-dkms-550 (550.144.03-0ubuntu0.24.04.1) ... update-initramfs: deferring update (trigger activated) update-initramfs: Generating /boot/initrd.img-6.14.0-28-generic INFO:Enable nvidia DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here Removing old nvidia-550.144.03 DKMS files... Deleting module nvidia-550.144.03 completely from the DKMS tree. Loading new nvidia-550.144.03 DKMS files... Building for 6.14.0-28-generic 6.14.0-29-generic Building for architecture x86_64 Building initial module for 6.14.0-28-generic ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-kernel- source-550.0.crash' Error! Bad return status for module build on kernel: 6.14.0-28-generic (x86_64) Consult /var/lib/dkms/nvidia/550.144.03/build/make.log for more information. dpkg: 处理软件包 nvidia-dkms-550 (--configure)时出错: 已安装 nvidia-dkms-550 软件包 post-installation 脚本 子进程返回错误状态 10 正在设置 linux-image-6.14.0-29-generic (6.14.0-29.29~24.04.1) ... 正在处理用于 initramfs-tools (0.142ubuntu25.4) 的触发器 ... update-initramfs: Generating /boot/initrd.img-6.14.0-28-generic 正在处理用于 linux-image-6.14.0-29-generic (6.14.0-29.29~24.04.1) 的触发器 ... /etc/kernel/postinst.d/dkms: * dkms: running auto installation service for kernel 6.14.0-29-generic Sign command: /usr/bin/kmodsign Signing key: /var/lib/shim-signed/mok/MOK.priv Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der Building module: Cleaning build area... unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'm ake' -j16 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.14.0-29-generic IGNORE_XEN _PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/6.14.0-29-generic/build LD =/usr/bin/ld.bfd CONFIG_X86_KERNEL_IBT= modules.........(bad exit status: 2) ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-kernel- source-550.0.crash' Error! Bad return status for module build on kernel: 6.14.0-29-generic (x86_64) Consult /var/lib/dkms/nvidia/550.144.03/build/make.log for more information. dkms autoinstall on 6.14.0-29-generic/x86_64 failed for nvidia(10) Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. * dkms: autoinstall for kernel 6.14.0-29-generic ...fail! run-parts: /etc/kernel/postinst.d/dkms exited with return code 11 dpkg: 处理软件包 linux-image-6.14.0-29-generic (--configure)时出错: 已安装 linux-image-6.14.0-29-generic 软件包 post-installation 脚本 子进程返回 错误状态 11 在处理时有错误发生: nvidia-dkms-550 linux-image-6.14.0-29-generic E: Sub-process /usr/bin/dpkg returned an error code (1)
最新发布
09-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值