c# - 在 Arch linux 中从终端创建 dotnet(.Net) 项目时出错
问题描述
我刚刚安装了 dotnet、dotnet-runtime、vscode 来在我的 garuda Linux(它是一种 arch Linux)中构建 dotnet 应用程序。当我尝试使用命令“dotnet new counsole -o myfrist”从终端创建一个新项目时,我得到了这个输出。
╭─venkey at garuda0 in ⌁/Documents/vscode/snd
╰─λ dotnet new console -o fristapp
The template "Console Application" was created successfully.
Processing post-creation actions...
Running 'dotnet restore' on fristapp/fristapp.csproj...
Determining projects to restore...
/home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Ref 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
Failed to restore /home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj (in 769 ms).
Restore failed.
Post action failed.
Description: Restore NuGet packages required by this project.
Manual instructions: Run 'dotnet restore'
即使我执行了这个命令,我仍然收到以下错误。
╭─venkey at garuda0 in ⌁/Documents/vscode/snd/fristapp
╰─λ dotnet restore
Determining projects to restore...
/home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Ref 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
Failed to restore /home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj (in 788 ms).
当我再次尝试运行代码时,我得到了这个错误。
╭─venkey at garuda0 in ⌁/Documents/vscode/snd/fristapp
╰─λ dotnet run
/home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Ref 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/venkey/Documents/vscode/snd/fristapp/fristapp.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
The build failed. Fix the build errors and run again.
出现错误,我无法创建任何 dotnet 应用程序,也无法运行 dotnet 应用程序。任何人都可以帮助解决这些错误并创建 dotnet 应用程序吗?
解决方案
这是 ca-certificates-mozilla 软件包的问题。您可以通过降级来解决此问题。版本 3.62-1 有效。
推荐阅读
- jquery - 使用jquery在打印窗口中单击打印按钮后如何调用ajax函数?
- c++ - C++ HTTP 客户端在 GET 请求后挂起 read() 调用
- c# - 在 ViewModel 类中的 SQl Db 的可观察集合中插入值
- python - 使用 sheet.insert_row() 通过 python api 在 gsheet 中设置日期格式
- c# - 生产者端的队列
- php - 如何根据 id 获取类别名称?
- c# - UseSpaPrerendering 从 .net core 3.0 开始被弃用,有什么替代方案?
- reactjs - 为什么我会收到来自 React 的此错误消息
- r - ggplot:绘制带有双 y 标签、彩色单元格和条件的网格
- ios - 如何使用 Swift 创建打开和关闭通用代码库的多个按钮