Ubuntu:Unable to locate package

xiaoxiao2021-02-28  11

Unable to locate package libx11-dev

本文参考Ubuntu:Unable to locate package(无法定位安装包) 环境:win10自带Ubuntu 14.04.5 LTS \n \l


1 前言

在最近的安装JDK和库文件时出现提示需要安装库文件的情况,如下:

frey@Frey:/mnt/e/topeet/Android_JDK$ sudo ./install-devel-packages.sh ==> Executing: 'apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx-lts-quantal:i386 libgl1-mesa-dev-lts-quantal g++-multilib mingw32 tofrodos lib32ncurses5-dev python-markdown libxml2-utils xsltproc zlib1g-dev:i386' Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libx11-dev E: Unable to locate package libreadline6-dev E: Unable to locate package libgl1-mesa-glx-lts-quantal E: Unable to locate package zlib1g-dev

2 解决办法

检查安装包是否存在 使用浏览器打开 http://packages.ubuntu.com/ 找到Search the contents of packages,输入库名称,选择exact matches,选择系统版本。 系统版本查看方法(可以从上图中查找或者用命令查询):

frey@Frey$ sudo lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty 或者: frey@Frey$ head -n 1 /etc/issue Ubuntu 14.04.5 LTS \n \l

搜索库

将找到的库使用命令sudo apt-get install XXX 逐一安装

sudo apt-get install libx11-6 sudo apt-get install libxau-dev sudo apt-get install libxcb1-dev sudo apt-get install libxmcp-dev sudo apt-get install x11proto-core-dev sudo apt-get install x11proto-input-dev sudo apt-get install x11proto-kb-dev sudo apt-get install xtrans-dev sudo apt-get install libx11-doc
转载请注明原文地址: https://www.6miu.com/read-2150256.html

最新回复(0)