ubuntu 22.04 安装 curl 的方法

前言

  • 使用VM Ware 虚拟机安装了新版本 ubuntu 22.04,搭建嵌入式Linux 的开发环境,遇到一些依赖包的安装问题

  • 在使用 curl 命令时发现 找不到 curl 命令, Command 'curl' not found

$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Command 'curl' not found, but can be installed with:
sudo snap install curl  # version 7.86.0, or
sudo apt  install curl  # version 7.81.0-1ubuntu1.6
See 'snap info curl' for additional versions.

安装 curl

  • 安装的方法很简单,因为 ubuntu 已经有了提示: $ sudo snap install curl
[sudo] password for zhangsz: 
curl 7.86.0 from Wouter van Bommel (woutervb) installed

功能验证

  • 安装好 curl 后,就可以正常的执行 curl 相关的操作了,如
zhangsz@zhangsz-virtual-machine:~$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 45769  100 45769    0     0   172k      0 --:--:-- --:--:-- --:--:--  172k

小结

  • ubuntu 安装软件包依赖还是比较的简单,可以根据提示尝试安装

  • curl 类似于 wget,也会经常使用

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhangsz_sh

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值