0

I have a jenkins server open and I'm attempting to sudo install:

sudo apt-get install libsqlite3-dev

Because I am using a pipeline that runs a python script, whereby this script would return the following error:

builtins.ModuleNotFoundError: No module named '_sqlite3'

Online articles have suggested to sudo install the package above. However, I would need root-privileges to do so.

I have installed the ssh-server plugin within jenkins and jenkins-cli.jar, is there a way to install the package with any of these two options, or an easier alternative?

Emil11
  • 199
  • 9
  • Possible duplicate of https://stackoverflow.com/questions/11880070/how-to-run-a-script-as-root-in-jenkins – tripleee Jan 05 '23 at 10:56
  • Another approach is to use temporary build slaves running Docker where the slave gets full privileges to install software as required. – tripleee Jan 05 '23 at 10:57
  • @tripleee I have checked that article however I did not build our jenkins server. Not sure about docker, I have little experience with it. – Emil11 Jan 05 '23 at 11:35
  • Then probably talk to your Jenkins admin about this requirement, as there is probably no way you can solve it without their cooperation. – tripleee Jan 05 '23 at 11:39
  • @tripleee Our admin is an introvert that never communicates with any one ... One difficult situation to another :) – Emil11 Jan 05 '23 at 11:59

0 Answers0