当前位置:   article > 正文

Ubantu 安装包的时候cannot locate package pcap,log4cpp安装的问题_cant locate package

cant locate package
  1. 首先要确定包的完整名字,比如列举的pcap,log4cpp等包都是因为包的名称不完整,所有无法定位的情况。
    这个时候需要使用
apt list | grep xxx
  • 1

xxx为找不到的库的名字,如

apt list | grep pcap
  • 1

接下来就可以看到一堆库,尽量找libxxx-dev的安装,如果不行再安装别的库
apt list | grep pcap
安装相应完整名字的库

2.可能是源不行,建议换源

备份 以及修改

sudo cp /etc/apt/sources.list   /etc/apt/sources.list.old
sudo gedit /etc/apt/sources.list

  • 1
  • 2
  • 3

删除里面的所有内容,然后把阿里源镜像复制进去。

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/555966
推荐阅读
  

闽ICP备14008679号