1

I installed openvpn-connect with brew install --cask openvpn-connect all good Today I run brew update; brew upgrade, there was an upgrade for openvpn-connect, the upgrade failed. I have since tried to uninstall it completely but the uninstall fails with:

    ==> Removing launchctl service org.openvpn.helper
    ==> Running uninstall script /Applications/OpenVPN Connect/Uninstall OpenVPN Connect.app/Contents/Resources/remove.sh
    Warning: uninstall script /Applications/OpenVPN Connect/Uninstall OpenVPN Connect.app/Contents/Resources/remove.sh does not exist; skipping.
    ==> Uninstalling packages:
    org.openvpn.client.pkg
    find: /Applications/OpenVPN Connect/OpenVPN Connect.app: No such file or directory
    Error: Failure while executing; `/usr/bin/sudo -E -- /usr/bin/xargs -0 -- /bin/bash -c set\ -euo\ pipefail'
    ''
    'for\ path\ in\ \"\$\{@\}\"\;\ do'
    '\ \ if\ \[\[\ -e\ \"\$\{path\}/.DS_Store\"\ \]\]\;\ then'
    '\ \ \ \ /bin/rm\ -f\ \"\$\{path\}/.DS_Store\"'
    '\ \ fi'
    ''
    '\ \ \#\ Some\ packages\ leave\ broken\ symlinks\ around\;\ we\ clean\ them\ out\ before'
    '\ \ \#\ attempting\ to\ \`rmdir\`\ to\ prevent\ extra\ cruft\ from\ accumulating.'
    '\ \ /usr/bin/find\ \"\$\{path\}\"\ -mindepth\ 1\ -maxdepth\ 1\ -type\ l\ \!\ -exec\ /bin/test\ -e\ \{\}\ \\\;\ -delete'
    ''
    '\ \ if\ \[\[\ -L\ \"\$\{path\}\"\ \]\]\;\ then'
    '\ \ \ \ \#\ Delete\ directory\ symlink.'
    '\ \ \ \ /bin/rm\ \"\$\{path\}\"'
    '\ \ elif\ \[\[\ -d\ \"\$\{path\}\"\ \]\]\;\ then'
    '\ \ \ \ \#\ Delete\ directory\ if\ empty.'
    '\ \ \ \ /usr/bin/find\ \"\$\{path\}\"\ -maxdepth\ 0\ -type\ d\ -empty\ -exec\ /bin/rmdir\ \{\}\ \\\;'
    '\ \ else'
    '\ \ \ \ \#\ Try\ \`rmdir\`\ anyways\ to\ show\ a\ proper\ error.'
    '\ \ \ \ /bin/rmdir\ \"\$\{path\}\"'
    '\ \ fi'
    'done'
    ' --` exited with 1. Here's the output:
    find: /Applications/OpenVPN Connect/OpenVPN Connect.app: No such file or directory

The application appears to be gone, however brew still tracks is as installed.

2
  • Which macOS are you using? It might also help if you state what you need or are asking a bit more clearly. – Alper Mar 19 at 10:30
  • I am on Big Sur, latest 11.2.3 – Mauro Mozzarelli Mar 24 at 10:12
1

I also have this issue yesterday and try a lot times today. Here it goes:

rm -r /usr/local/Caskroom/openvpn-connect
brew update-reset && brew update
brew install --cask openvpn-connect

if successfully installed, you can try uninstall to ensure that.

brew uninstall openvpn-connect

Hope it works for you.

0
1

I tried again this morning, brew pulled a newer openvpn-connect version 3.2.7,3220 the issue disappeared

0

brew uninstall openvpn-connect also fails with the same error. I think I said that in my first post. This is definately a bug with the package. After I installed and attempted to uninstall openvpn-connect now I get also the following error every time a new Terminal shell is opened:

mono-commands: Permission denied

which might be something left behind by openvpn-connect

0

Original cause: https://github.com/Homebrew/homebrew-cask/pull/101360

The problem still persists

==> Upgrading openvpn-connect
==> Downloading https://swupdate.openvpn.net/downloads/connect/openvpn-connect-3.2.7.3220_signed.dmg
Already downloaded: /Users/ujezdsky/Library/Caches/Homebrew/downloads/2b07f9715e3466d1217fe13870c1451f93e829e339701d2f10daaebf48f76bde--openvpn-connect-3.2.7.3220_signed.dmg
==> Removing launchctl service org.openvpn.client
Password:
==> Removing launchctl service org.openvpn.helper
==> Running uninstall script /Applications/OpenVPN Connect/Uninstall OpenVPN Connect.app/Contents/Resources/remove.sh
==> Purging files for version 3.2.7,3220 of Cask openvpn-connect
Error: openvpn-connect: uninstall script /Applications/OpenVPN Connect/Uninstall OpenVPN Connect.app/Contents/Resources/remove.sh does not exist.

I have created dummy script at that location

cat "/Applications/OpenVPN Connect/Uninstall OpenVPN Connect.app/Contents/Resources/remove.sh"
#!/usr/bin/env bash
echo Fixing the upgrade

and then the upgrade was finally OK:

==> Upgrading 1 outdated package:
openvpn-connect 3.2.6,3136 -> 3.2.7,3220
==> Upgrading openvpn-connect
==> Downloading https://swupdate.openvpn.net/downloads/connect/openvpn-connect-3.2.7.3220_signed.dmg
Already downloaded: /Users/ujezdsky/Library/Caches/Homebrew/downloads/2b07f9715e3466d1217fe13870c1451f93e829e339701d2f10daaebf48f76bde--openvpn-connect-3.2.7.3220_signed.dmg
==> Removing launchctl service org.openvpn.client
Password:
==> Removing launchctl service org.openvpn.helper
==> Running uninstall script /Applications/OpenVPN Connect/Uninstall OpenVPN Connect.app/Contents/Resources/remove.sh
Hi, removing
==> Uninstalling packages; your password may be necessary:
org.openvpn.client.pkg
org.openvpn.client_framework.pkg
org.openvpn.client_launch.pkg
org.openvpn.client_uninstall.pkg
org.openvpn.helper_framework.pkg
org.openvpn.helper_launch.pkg
==> Running installer for openvpn-connect; your password may be necessary.
Package installers may write to any location; options such as `--appdir` are ignored.
installer: Package name is OpenVPN Connect
installer: Installing at base path /
installer: The install was successful.
==> Purging files for version 3.2.6,3136 of Cask openvpn-connect
🍺  openvpn-connect was successfully upgraded!

Verified the dummy remove.sh script was updated by the proper one:

cat "/Applications/OpenVPN Connect/Uninstall OpenVPN Connect.app/Contents/Resources/remove.sh"
#!/usr/bin/env bash
SECONDS_SINCE_EPOCH="$(date +%s)"
LOG="/tmp/openvpn-connect-uninstall-$SECONDS_SINCE_EPOCH.log"
...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .