Tuesday, May 5, 2020

Setting up vscode-bash-debug - Only bash versions 4.* or 5.* are supported.


While working through vscode-bash-debug setup

I hit this error: Only bash versions 4.* or 5.* are supported.

 







For macosx users (we appear to be the users hitting this issue), the solution is to simply to update the bash version, which can be done in about 30 seconds with a single brew command:


brew install bash

after this restart VSC and should pickup bash version 5.x :)

More details in my bash-by-example repo (my notes and scripts around common command-line bash tasks):

https://github.com/dgapitts/bash-by-example/blob/master/example_003_vscode-bash-debug_setup_and_brew/README.md


NB This part of a buffer project to make handy notes on the various bash cli/scripting tool I typically use

- https://github.com/dgapitts/bash-by-example


Saturday, April 18, 2020

VirtualBox VM was created with a user that doesn't match the current user running Vagrant.

Recently I moved some project files from my old to new laptop and hit this "vagrant up" error

~/projects/vagrant-postgres9.6 $ vagrant up
The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
be used to manage the VM that was created. Please re-run Vagrant with
that user. This is not a Vagrant issue.


The UID used to create the VM was: 303684054
Your UID is: 501


Googling I soon found 


The VirtualBox VM was created with a user that doesn't match the current user running Vagrant. #8630https://github.com/hashicorp/vagrant/issues/8630


and TLDR the fix is a simple mv on the .vagrant file:


~/projects/vagrant-postgres9.6 $ mv .vagrant .vagrant.bak
~/projects/vagrant-postgres9.6 $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos/7' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'centos/7'
    default: URL: https://vagrantcloud.com/centos/7

==> default: Adding box 'centos/7' (v1905.1) for provider: virtualbox


NB In case your curious ... for more details around my vagrant postgres setup please see:
I also presented to the Amsterdam Postgres UserGroup last year: