【发布时间】:2017-11-28 10:10:01
【问题描述】:
我必须在我的池中的 Ubuntu 服务器节点上安装 java。我正在尝试通过任务来完成,但每次我尝试使用以下代码通过任务安装 java 时:
TaskAddParameter taskToAdd = new TaskAddParameter();
taskToAdd.withId(taskId).withCommandLine(String.format("sudo apt-get install openjdk-8-jdk"));
// Associate resource file with task
taskToAdd.withResourceFiles(getListOfResourceFiles(sas));
我收到一个错误提示
sudo: no tty present and no askpass program specified
我也在池级别尝试了上述方法,在池的 StartTask 中给出了这个命令,但它也给了我同样的错误。
我需要在我的池节点上安装 java,以便我可以在其上运行我的 java 程序。
【问题讨论】:
标签: linux azure azure-storage azure-batch