Linux distribution debian 11. does not have automatic support. .NET Core 2.1 can still be used via dotnetcore2 if the required dependencies are installed

Laidson Paes 1 Reputation point
2022-04-08T10:17:09.613+00:00

Hello,

I am working on an Azure Function which is written in Python 3.8. Azure function is deployed in Linux .
I cretaed a HttpTrigger on azure functions that have a active EndPoint, however when the process starts to run into my code, I get a dependeces error:
This the following exception:
Exception: NotImplementedError: Linux distribution debian 11. does not have automatic support. .NET Core 2.1 can still be used via dotnetcore2 if the required dependencies are installed. Visit https://aka.ms/dotnet-install-linux for Linux distro specific .NET Core install instructions. Follow your distro specific instructions to install dotnet-runtime- and replace with 2.1
I have also have a Missing pkgs: {'liblttng-ust.so.0'} when the code get the error

I have install:
dotnetcore2 via requirements.txt file
.NET localy HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0
but still getting the error.

Any help is appreciated.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,240 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Laidson Paes 1 Reputation point
    2022-04-12T11:52:19.19+00:00

    Thanks for the reply, below is the requested information.

    1. Are you trying to run Azure Function locally on your machine? If yes, what is the OS version and is it on WSL (Windows Sybsystem for Linux)
      a. Yes, locally is working properly. I’m using Windows 10 Enterprise 64bits. The issue became after the azure deploy.
    2. Can you please share the steps that you followed resulting in this error? a. After perform the deployment on VSCode to azure, I go inside the Function app on Azure portal; b. On the Functions part and get the deploy function url by the “Get Function URL” c. With this url I used Postman to POST my msg;
         i. I have a control on the Function code that works like: 
             1. When the JSON msg came from Postman with an empty Value (EX: {name: “”}) I return the msg to fill the value on name key (This part works on my machine and on Azure)
      
      d. However, when the JSON msg is sent correctly, with a not empty value (EX: {name:”Azure”}), should start to process my model code. On this point I get an error on the function monitor at Azure portal.

    Result: Failure Exception: NotImplementedError: Linux distribution debian 11. does not have automatic support. .NET Core 2.1 can still be used via dotnetcore2 if the required dependencies are installed. Visit https://aka.ms/dotnet-install-linux for Linux distro specific .NET Core install instructions. Follow your distro specific instructions to install dotnet-runtime-* and replace * with 2.1. Stack: File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/dispatcher.py", line 402, in _handle__invocation_request call_result = await self._loop.run_in_executor( File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/dispatcher.py", line 611, in _run_sync_func return ExtensionManager.get_sync_invocation_wrapper(context, File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/extension.py", line 215, in _raw_invocation_wrapper result = function(**args) File "/home/site/wwwroot/HttpTriggerXXX/init.py", line 30, in main XXXmodel = StartXXXModel(api_json) File "/home/site/wwwroot/src/subsystems/start_XXX.py", line 22, in init runtime.ensure_dependencies() File "/home/site/wwwroot/.python_packages/lib/site-packages/dotnetcore2/runtime.py", line 285, in ensure_dependencies if not attempt_get_deps(): File "/home/site/wwwroot/.python_packages/lib/site-packages/dotnetcore2/runtime.py", line 279, in attempt_get_deps raise NotImplementedError(err_msg + '\n' + _unsupported_help_msg)

    1. In the question, you have mentioned about dotnet core 2.1 as well as using the registry key below:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0
      Please note that Registry keys only work on Windows OS and it does not have any effect on Linux even though it is running on WSL on same machine.

    a) Ok, this was an attempt at a solution. Before install that I had the error.

    Looking forward to getting more information about this issue to help me understand it better. Please let me know if you have any questions.


  2. AnuragSingh-MSFT 19,691 Reputation points
    2022-04-26T09:53:57.483+00:00

    Hi @Laidson Paes ,

    Thank you for reaching out to Microsoft Support for investigating this issue.

    Based on further troubleshooting, it was identified that the Azure Function App was trying to do interactive log-in (which requires end users to be available). This is disabled when application is deployed to Azure app service/function App, because of which the error was being received. In such case, Service Principal or Managed Identity based authentication should be used.

    ---
    Please 'Accept as answer' and ‘Upvote’ if our discussion above helped, so that it can help others in the community looking for help on similar topics.