为什么我不能在 Mac 上添加 Azure 数据库扩展?
Why Can't I Add Azure DB Extension on Mac?
成功完成第 1 步和第 2 步后,我进入第 3 步:
"为 Azure CLI 安装 db-up 扩展:
az extension add --name db-up
"
然而,当我 运行 这个命令时,我收到以下输出:
X@Y-MacBook-Pro djangoapp % az extension add --name db-up
Failed to delete '/Users/X/.azure/cliextensions/db-up': [Errno 2] No such file or directory: '/Users/X/.azure/cliextensions/db-up'. Retrying ...
Failed to delete '/Users/X/.azure/cliextensions/db-up': [Errno 2] No such file or directory: '/Users/X/.azure/cliextensions/db-up'. Retrying ...
Failed to delete '/Users/X/.azure/cliextensions/db-up': [Errno 2] No such file or directory: '/Users/X/.azure/cliextensions/db-up'. Retrying ...
Failed to delete '/Users/X/.azure/cliextensions/db-up': [Errno 2] No such file or directory: '/Users/X/.azure/cliextensions/db-up'. You may try to delete it manually.
An error occurred. Pip failed with status code 1. Use --debug for more information.
有什么想法吗?我已经尝试了一些解决方案来解决我在 Stack/GitHub 上发现的类似错误,但到目前为止还没有成功。目标是将 Django 应用程序部署到 Azure,并在 Azure 上连接一个数据库。谢谢!
最近更新了official document。现在,您可以通过门户、Azure CLI 和 VS 代码将数据库连接到应用程序。
下面是帮助通过 Azure CLI 将 Web 应用程序连接到数据库的命令。
az webapp config appsettings set \
--resource-group $RESOURCE_GROUP_NAME \
--name $APP_SERVICE_NAME \
--settings DBHOST=$DB_SERVER_NAME DBNAME=$DB_NAME DBUSER=$ADMIN_USERNAME DBPASS=$ADMIN_PWD
成功完成第 1 步和第 2 步后,我进入第 3 步:
"为 Azure CLI 安装 db-up 扩展:
az extension add --name db-up
"
然而,当我 运行 这个命令时,我收到以下输出:
X@Y-MacBook-Pro djangoapp % az extension add --name db-up
Failed to delete '/Users/X/.azure/cliextensions/db-up': [Errno 2] No such file or directory: '/Users/X/.azure/cliextensions/db-up'. Retrying ...
Failed to delete '/Users/X/.azure/cliextensions/db-up': [Errno 2] No such file or directory: '/Users/X/.azure/cliextensions/db-up'. Retrying ...
Failed to delete '/Users/X/.azure/cliextensions/db-up': [Errno 2] No such file or directory: '/Users/X/.azure/cliextensions/db-up'. Retrying ...
Failed to delete '/Users/X/.azure/cliextensions/db-up': [Errno 2] No such file or directory: '/Users/X/.azure/cliextensions/db-up'. You may try to delete it manually.
An error occurred. Pip failed with status code 1. Use --debug for more information.
有什么想法吗?我已经尝试了一些解决方案来解决我在 Stack/GitHub 上发现的类似错误,但到目前为止还没有成功。目标是将 Django 应用程序部署到 Azure,并在 Azure 上连接一个数据库。谢谢!
最近更新了official document。现在,您可以通过门户、Azure CLI 和 VS 代码将数据库连接到应用程序。 下面是帮助通过 Azure CLI 将 Web 应用程序连接到数据库的命令。
az webapp config appsettings set \
--resource-group $RESOURCE_GROUP_NAME \
--name $APP_SERVICE_NAME \
--settings DBHOST=$DB_SERVER_NAME DBNAME=$DB_NAME DBUSER=$ADMIN_USERNAME DBPASS=$ADMIN_PWD