I've been following a tutorial to setup an OpenVPN server. However, it didn't work and I decided to remove OpenVPN and try again. I did it with

sudo apt-get purge openvpn

command and then

rm -rf /etc/openvpn/
rm -rf /usr/share/easy-rsa/
rm - rf /usr/share/doc/easy-rsa/
rm -rf /root/openvpn-ca/
rm -rf /root/openvpn-clients/
rm -rf /run/openvpn/

Now having run

 sudo apt-get install openvpn easy-rsa

 make-cadir ~/openvpn-ca

I get a note:

 cp: cannot stat '/usr/share/easy-rsa/vars': No such file or directory
 cp: cannot stat '/usr/share/easy-rsa/*.cnf': No such file or directory

When I then cd to ~/openvpn-ca and ls I don't get any files, while. according to tutorial, there should be file vars there.

What should I do now? I'd think the reinstallation would create all the files necessary, but it seems that vars file hasn't been.


Likely reinstallation will fix it - but that's not what you did

Having manually deleted files belonging to the easy-rsa package, the package manager has no idea they're gone. So when you did

sudo apt-get install openvpn easy-rsa

you likely got a message that easy-rsa is already the newest version and no files were actually restored: try

sudo apt-get install --reinstall easy-rsa


  • Thanks. It seems to have fixed it! – parsecer May 2 '19 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.