LocalDB is not supported on this Platform
I had this problem when switching from a windows machine to MacBook Pro. As others pointed out, LocalDB is for SQL Server Express Edition.
To fix this, you'll need to install SQL Server and use localhost instead of LocalDB.
LocalDb is a packaging mechanism for SQL Server Express Edition, and is only available for Windows. On Ubuntu you can install regular SQL Server Express Edition.
https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-overview
Here are the install scripts for Ubuntu, Red Hat, and SUSE.
Or use the Docker Images:
https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker