- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 Azure Devops 上的内置 VS2017 代理上安装 Inno Setup 5
用于我的构建管道之一,但我在标准输出中得到以下两行,但它以代码退出1 并且日志文件中没有任何内容。我的问题:
这是我认为最重要的来自标准输出的两行
innosetup not installed. An error occurred during installation:
The process cannot access the file '...\.chocolateyPending' because it is being used by another process.
这是我在 Azure Devops 上的构建管道:
我的安装程序脚本是用 javascript 编写的,并在安装依赖项后通过 npm 脚本执行
const utils = require('./utils');
const fs = require('fs');
const path = require('path');
const spawn = require('child_process').spawn;
const command = 'cmd /c choco install innosetup --yes --force --no-progress -ia \'/VERYSILENT\'';
const logDirectory = path.join( 'C:', 'ProgramData', 'chocolatey', 'logs' );
function install() {
return new Promise( resolve => {
const cmd = command.split(' ').filter( ( x, i ) => i === 0 ).join('');
const args = command.split(' ').filter( ( x, i ) => i !== 0 );
var sqlcmd = spawn( cmd, args );
sqlcmd.stdout.on( 'data', data => {
console.log( data.toString().replace( /\r\n$/gmi, '' ) );
} )
sqlcmd.stderr.on( 'data', data => {
console.error( 'error', data.toString() );
process.exit( 1 );
} )
sqlcmd.on( 'exit', code => {
resolve( code );
} )
});
}
( async () => {
utils.header( 'installing Inno Setup' );
const installExitCode = await install();
utils.header( 'Log directory:', logDirectory );
console.log( ' *', fs.readdirSync( logDirectory ).join( '\r\n * ' ) );
utils.header( 'chocolatey.log' );
fs.createReadStream( path.join( logDirectory, 'chocolatey.log' ) ).pipe( process.stdout );
utils.header( 'choco.summary.log' );
fs.createReadStream( path.join( logDirectory, 'choco.summary.log' ) ).pipe( process.stdout );
if ( installExitCode !== 0 ) {
console.log( 'installer exited with error code:', installExitCode );
process.exit( installExitCode );
}
})();
这是我从失败的 Azure Devops 构建中获得的标准输出:
2019-01-22T18:34:19.0336866Z ########################################
2019-01-22T18:34:19.0337014Z
2019-01-22T18:34:19.0337191Z installing Inno Setup
2019-01-22T18:34:19.0337335Z
2019-01-22T18:34:19.0337513Z Chocolatey v0.10.11
2019-01-22T18:34:19.0337798Z Installing the following packages:
2019-01-22T18:34:19.0338258Z innosetup
2019-01-22T18:34:19.0338554Z By installing you accept licenses for the packages.
2019-01-22T18:34:19.0338705Z
2019-01-22T18:34:19.0338856Z InnoSetup v5.6.1 (forced) [Approved]
2019-01-22T18:34:19.0339051Z innosetup package files install completed. Performing other installation steps.
2019-01-22T18:34:19.0339266Z innosetup not installed. An error occurred during installation:
2019-01-22T18:34:19.0339462Z Item has already been added. Key in dictionary: 'NPM_CONFIG_CACHE' Key being added: 'npm_config_cache'
2019-01-22T18:34:19.0339703Z The process cannot access the file 'C:\ProgramData\chocolatey\lib\InnoSetup\.chocolateyPending' because it is being used by another process.
2019-01-22T18:34:19.0339890Z
2019-01-22T18:34:19.0340054Z ########################################
2019-01-22T18:34:19.0340204Z
2019-01-22T18:34:19.0340364Z Log directory: C:\ProgramData\chocolatey\logs
2019-01-22T18:34:19.0340513Z
2019-01-22T18:34:19.0340775Z * choco.summary.log
2019-01-22T18:34:19.0342937Z * chocolatey.log
2019-01-22T18:34:19.0343090Z
2019-01-22T18:34:19.0343282Z ########################################
2019-01-22T18:34:19.0343425Z
2019-01-22T18:34:19.0343598Z chocolatey.log
2019-01-22T18:34:19.0343738Z
2019-01-22T18:34:19.0344018Z
2019-01-22T18:34:19.0344255Z ########################################
2019-01-22T18:34:19.0344406Z
2019-01-22T18:34:19.0344582Z choco.summary.log
2019-01-22T18:34:19.0344722Z
2019-01-22T18:34:19.0344902Z installer exited with error code: 1
最佳答案
回答您的一些直接问题...
Does Inno Support being installed in this way?
是的,innosetup 确实支持以这种方式安装。您可以在包页面上看到 here .页面顶部的绿色灯泡表示此软件包版本已通过 Chocolatey 拥有的自动化流程正确安装,从而验证软件包是否已正确安装。
Does chocolatey require being run on machine with a logged in GUI?
不,在大多数情况下这不是必需的。有些 Chocolatey 包不会静默安装,用于安装这些包的机制“可能”要求安装在实际用户进程中运行,但大多数包不需要这个。
What am I doing wrong?
我怀疑“某些东西”在通过 npm 运行并安装在 Promise 中时无法正常工作。查看日志,好像有这样一条:
2019-01-22T18:34:19.0339462Z Item has already been added. Key in dictionary: 'NPM_CONFIG_CACHE' Key being added: 'npm_config_cache'
在 Chocolatey 日志的中间,这对我来说没有意义。
我最好的建议是在此 extension 上使用独立的 Chocolatey Task (注意:完全公开,我是这个扩展的作者),或者,尝试在 npm 之外进行安装,可能直接使用 PowerShell 任务。
关于azure-devops - Chocolatey 无法在 Azure Pipeline 上安装 Inno Setup,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54314785/
我通过 spring ioc 编写了一些 Rest 应用程序。但我无法解决这个问题。这是我的异常(exception): org.springframework.beans.factory.BeanC
我对 TestNG、Spring 框架等完全陌生,我正在尝试使用注释 @Value通过 @Configuration 访问配置文件注释。 我在这里想要实现的目标是让控制台从配置文件中写出“hi”,通过
为此工作了几个小时。我完全被难住了。 这是 CS113 的实验室。 如果用户在程序(二进制计算器)结束时选择继续,我们需要使用 goto 语句来到达程序的顶部。 但是,我们还需要释放所有分配的内存。
我正在尝试使用 ffmpeg 库构建一个小的 C 程序。但是我什至无法使用 avformat_open_input() 打开音频文件设置检查错误代码的函数后,我得到以下输出: Error code:
使用 Spring Initializer 创建一个简单的 Spring boot。我只在可用选项下选择 DevTools。 创建项目后,无需对其进行任何更改,即可正常运行程序。 现在,当我尝试在项目
所以我只是在 Mac OS X 中通过 brew 安装了 qt。但是它无法链接它。当我尝试运行 brew link qt 或 brew link --overwrite qt 我得到以下信息: ton
我在提交和 pull 时遇到了问题:在提交的 IDE 中,我看到: warning not all local changes may be shown due to an error: unable
我跑 man gcc | grep "-L" 我明白了 Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more inf
我有一段代码,旨在接收任何 URL 并将其从网络上撕下来。到目前为止,它运行良好,直到有人给了它这个 URL: http://www.aspensurgical.com/static/images/a
在过去的 5 个小时里,我一直在尝试在我的服务器上设置 WireGuard,但在完成所有设置后,我无法 ping IP 或解析域。 下面是服务器配置 [Interface] Address = 10.
我正在尝试在 GitLab 中 fork 我的一个私有(private)项目,但是当我按下 fork 按钮时,我会收到以下信息: No available namespaces to fork the
我这里遇到了一些问题。我是 node.js 和 Rest API 的新手,但我正在尝试自学。我制作了 REST API,使用 MongoDB 与我的数据库进行通信,我使用 Postman 来测试我的路
下面的代码在控制台中给出以下消息: Uncaught DOMException: Failed to execute 'appendChild' on 'Node': The new child el
我正在尝试调用一个新端点来显示数据,我意识到在上一组有效的数据中,它在数据周围用一对额外的“[]”括号进行控制台,我认为这就是问题是,而新端点不会以我使用数据的方式产生它! 这是 NgFor 失败的原
我正在尝试将我的 Symfony2 应用程序部署到我的 Azure Web 应用程序,但遇到了一些麻烦。 推送到远程时,我在终端中收到以下消息 remote: Updating branch 'mas
Minikube已启动并正在运行,没有任何错误,但是我无法 curl IP。我在这里遵循:https://docs.traefik.io/user-guide/kubernetes/,似乎没有提到关闭
每当我尝试docker组成任何项目时,都会出现以下错误。 我尝试过有和没有sudo 我在这台机器上只有这个问题。我可以在Mac和Amazon WorkSpace上运行相同的容器。 (myslabs)
我正在尝试 pip install stanza 并收到此消息: ERROR: No matching distribution found for torch>=1.3.0 (from stanza
DNS 解析看起来不错,但我无法 ping 我的服务。可能是什么原因? 来自集群中的另一个 Pod: $ ping backend PING backend.default.svc.cluster.l
我正在使用Hibernate 4 + Spring MVC 4当我开始 Apache Tomcat Server 8我收到此错误: Error creating bean with name 'wel
我是一名优秀的程序员,十分优秀!