树莓派安装nc

尝试直接用sudo apt install nc命令安装nc,然而并不可以

sh_zh@raspberrypi4b:~ $ sudo apt install nc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package nc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'nc' has no installation candidate

网上都是用yum install nc命令安装nc的,然而我们的树霉派系统是debian

解决方法

nc全称为netcat,尝试sudo apt install netcat命令

sh_zh@raspberrypi4b:~ $ sudo apt install netcat
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  netcat-openbsd
The following NEW packages will be installed:
  netcat netcat-openbsd
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.3 kB of archives.
After this operation, 122 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bullseye/main arm64 netcat-openbsd arm64 1.217-3 [40.5 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 netcat all 1.10-46 [9,728 B]
Fetched 50.3 kB in 1s (34.0 kB/s)
Selecting previously unselected package netcat-openbsd.
(Reading database ... 98647 files and directories currently installed.)
Preparing to unpack .../netcat-openbsd_1.217-3_arm64.deb ...
Unpacking netcat-openbsd (1.217-3) ...
Selecting previously unselected package netcat.
Preparing to unpack .../netcat_1.10-46_all.deb ...
Unpacking netcat (1.10-46) ...
Setting up netcat-openbsd (1.217-3) ...
update-alternatives: using /bin/nc.openbsd to provide /bin/nc (nc) in auto mode
Setting up netcat (1.10-46) ...
Processing triggers for man-db (2.9.4-2) ...
sh_zh@raspberrypi4b:~ $ 

安装成功

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值