Solution:
1、cd /etc/sudoers.d
2、touch jenkins
3、vi jenkins
Add the following two lines in the jenkins file and save