Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subprocess failed. Error #55

Closed
Aquarian-Age opened this issue Jan 6, 2021 · 1 comment
Closed

Subprocess failed. Error #55

Aquarian-Age opened this issue Jan 6, 2021 · 1 comment

Comments

@Aquarian-Age
Copy link

tar2rpm -name "ccal" -version "0.0.1" -release "v0.6.9" -arch "x86_64" -licence "MIT" -prein "/usr/bin/ccal-single" -file "ccal.rpm" ccal.tar

sudo zypper in ccal.rpm

正在加载软件源数据...
正在读取已安装的软件包...
正在解决软件包依赖关系...

将安装以下 1 个新软件包:
  ccal

1 个软件包将新装.
总下载大小:0 B。已缓存:2.6 MiB。 操作完成后,将使用额外的 5.8 MiB。
继续吗? [y/n/v/...? 显示全部选项] (y): y
在缓存 ccal.rpm 中                                                                                (1/1),   2.6 MiB (解压后   5.8 MiB)

正在检查文件冲突: ..............................................................................................................[完毕]
(1/1) 正在安装:ccal-0.0.1-v0.6.9.x86_64 ........................................................................................[错误]
安装 ccal-0.0.1-v0.6.9.x86_64 失败:
错误: Subprocess failed. Error: RPM 失败: /var/tmp/rpm-tmp.UtwbaF: line 1: /usr/bin/ccal-single: No such file or directory
error: %prein(ccal-0:0.0.1-v0.6.9.x86_64) scriptlet failed, exit status 127
error: ccal-0:0.0.1-v0.6.9.x86_64: install failed

What should I do?

@jarondl
Copy link
Collaborator

jarondl commented Jan 7, 2021

Look at the flag help:

prein = flag.String("prein", "", "prein scriptlet contents (not filename)")

The content of prein should be the scriptlet itself: something you can run on the target host, e.g. a list of commands or something. It seems like you passed in /usr/bin/ccal-single, which tries to run this command, but it does not exist on the target host.

Either you want to include this file in your installation, and then use postin (which should work because the file is already there), or you want to replace the flag value with the contents of the file (in bash you can do -prein="$(cat /usr/bin/ccal-single)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants