我正在尝试在 Cloud Foundry 中推送一个 nodejs 应用程序,而 js 依次调用 shell 脚本,其中包括一些安装命令。在 shell 脚本执行期间,我收到以下错误:
2016-07-13T12:13:28.80+0000 [App/0] OUT stderrsudo: no tty present and no askpass program specified
2016-07-13T12:13:28.80+0000 [App/0] OUT E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
2016-07-13T12:13:28.80+0000 [App/0] OUT E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?