$ npm i -g azure-functions-core-tools@4
...
npm error path /usr/local/share/npm-global/lib/node_modules/azure-functions-core-tools
npm error command failed
npm error command sh -c node lib/install.js
npm error attempting to GET "https://functionscdn.azureedge.net/public/4.0.1/Azure.Functions.Cli.linux-x64.4.0.1.zip"
npm error Error downloading zip file from https://functionscdn.azureedge.net/public/4.0.1/Azure.Functions.Cli.linux-x64.4.0.1.zip
npm error Expected: 200, Actual: 404
EDIT: Workaround:
npm i -g azure-functions-core-tools@4.0.5801