首页 > 解决方案 > 缺少“卷曲”工具。无法下载 Dart SDK。考虑运行“sudo apt-get install curl”

问题描述

hared_preferences: ^0.5.3+4pubspec.yaml文件中添加依赖项后,我面临这个问题。

添加依赖后,建议我更新flutter sdk以使用依赖的版本。所以我只是跑flutter upgrade。之后,我无法运行应用程序,并且对于每个命令(Flutter upgradeFlutter doctor),都会引发以下错误。

缺少“卷曲”工具。无法下载 Dart SDK。考虑运行“sudo apt-get install curl”。

进程以退出代码 1 结束

我也运行命令sudo apt-get install curl并得到以下结果。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 curl : Depends: libcurl3-gnutls (= 7.47.0-1ubuntu2) but 7.47.0-1ubuntu2.12 is to be installed
E: Unable to correct problems, you have held broken packages. 

请指导我摆脱问题。

标签: androidcurlflutterdart

解决方案


只要去你安装flutter的地方并删除你下载的flutter并下载一个新的错误就会消失


推荐阅读