0

I need to install a pre-built environment for my application to be deployed, with a bash script that i add to parameters.

#!/bin/bash
apt-get install build-essential python3-dev python3-pip python3-setuptools python3-wheel

I got the permission error, so I tried this as suggested

#!/bin/bash
killall apt apt-get
rm /var/lib/apt/lists/lock
apt-get install build-essential python3-dev python3-pip python3-setuptools python3-wheel

The problem is that i can't use sudo (sudo doesn't work on azure), how to manage this and force the postbuild installation without sudo

(I have tried to add exec, but it said : it can only be used by a terminal).

Moun
  • 325
  • 2
  • 16

1 Answers1

1

sudo is working on my side on DevOps pipeline.

Add sudo in my bash script: enter image description here

My yaml:

trigger: none

pool:
  vmImage: ubuntu-latest

steps:
- task: Bash@3
  inputs:
    filePath: 'install.sh'

Pipeline result: enter image description here

If the issue persists for you, please elaborate a bit for your agent info(Microsoft-hosted agent or self-hosted), error screenshot, log...etc. What azure cloud you mean if it's not DevOps.

wade zhou - MSFT
  • 1,397
  • 1
  • 3
  • 6