无法找到软件包 libjpeg-dev

无法找到软件包 libjpeg-dev

我正在尝试通过 Ubuntu 机器上的命令安装 libjpeg-dev sudo apt-get install libjpeg-dev,但一直出现以下错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libjpeg-dev

有关我的机器的一些信息:

Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty

Linux ip-172-31-33-222 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

/etc/apt/sources.list 文件:

deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty main
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty main

deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates main
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates main

deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty universe multiverse
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty universe multiverse
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse

我也尝试添加以下源,但没有帮助:

 deb-src http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse

有任何想法吗?

更新(2015年8月12日)

apt-get update 的输出:

ubuntu:$ sudo apt-get update
Ign http://us-west-2.ec2.archive.ubuntu.com trusty InRelease
Ign http://us-west-2.ec2.archive.ubuntu.com trusty-updates InRelease
Get:1 http://us-west-2.ec2.archive.ubuntu.com trusty Release.gpg [933 B]
Get:2 http://us-west-2.ec2.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Get:3 http://us-west-2.ec2.archive.ubuntu.com trusty Release [58.5 kB]
Get:4 http://us-west-2.ec2.archive.ubuntu.com trusty-updates Release [63.5 kB]
Get:5 http://us-west-2.ec2.archive.ubuntu.com trusty/main Sources [1,064 kB]
Get:6 http://us-west-2.ec2.archive.ubuntu.com trusty/universe Sources [6,399 kB]
Ign http://archive.ubuntu.com trusty InRelease
Ign http://security.ubuntu.com trusty-security InRelease
Get:7 http://archive.ubuntu.com trusty Release.gpg [933 B]
Get:8 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://ppa.launchpad.net trusty InRelease
Get:9 http://archive.ubuntu.com trusty Release [58.5 kB]
Get:10 http://security.ubuntu.com trusty-security Release [63.5 kB]
Get:11 http://us-west-2.ec2.archive.ubuntu.com trusty/multiverse Sources [174 kB]
Get:12 http://us-west-2.ec2.archive.ubuntu.com trusty/main amd64 Packages [1,350 kB]
Ign http://ppa.launchpad.net trusty InRelease
Get:13 http://us-west-2.ec2.archive.ubuntu.com trusty/universe amd64 Packages [5,859 kB]
Get:14 http://ppa.launchpad.net trusty Release.gpg [316 B]
Get:15 http://archive.ubuntu.com trusty/main Sources [1,064 kB]
Get:16 http://security.ubuntu.com trusty-security/main Sources [91.1 kB]
Get:17 http://ppa.launchpad.net trusty Release.gpg [316 B]
Get:18 http://security.ubuntu.com trusty-security/universe Sources [29.4 kB]
Get:19 http://ppa.launchpad.net trusty Release [15.1 kB]
Get:20 http://security.ubuntu.com trusty-security/multiverse Sources [2,330 B]
Get:21 http://security.ubuntu.com trusty-security/main amd64 Packages [326 kB]
Get:22 http://archive.ubuntu.com trusty/universe Sources [6,399 kB]
Get:23 http://us-west-2.ec2.archive.ubuntu.com trusty/multiverse amd64 Packages [132 kB]
Get:24 http://us-west-2.ec2.archive.ubuntu.com trusty/main Translation-en [762 kB]
Get:25 http://security.ubuntu.com trusty-security/universe amd64 Packages [113 kB]
Get:26 http://ppa.launchpad.net trusty Release [15.1 kB]
Get:27 http://us-west-2.ec2.archive.ubuntu.com trusty/multiverse Translation-en [102 kB]
Get:28 http://us-west-2.ec2.archive.ubuntu.com trusty/universe Translation-en [4,089 kB]
Get:29 http://security.ubuntu.com trusty-security/multiverse amd64 Packages [3,686 B]
Get:30 http://ppa.launchpad.net trusty/main amd64 Packages [3,019 B]
Get:31 http://security.ubuntu.com trusty-security/main Translation-en [178 kB]
Get:32 http://us-west-2.ec2.archive.ubuntu.com trusty-updates/main Sources [228 kB]
Get:33 http://us-west-2.ec2.archive.ubuntu.com trusty-updates/universe Sources [132 kB]
Get:34 http://us-west-2.ec2.archive.ubuntu.com trusty-updates/multiverse Sources [5,143 B]
Get:35 http://us-west-2.ec2.archive.ubuntu.com trusty-updates/main amd64 Packages [599 kB]
Get:36 http://security.ubuntu.com trusty-security/multiverse Translation-en [1,679 B]
Get:37 http://us-west-2.ec2.archive.ubuntu.com trusty-updates/universe amd64 Packages [302 kB]
Get:38 http://us-west-2.ec2.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [11.9 kB]
Get:39 http://us-west-2.ec2.archive.ubuntu.com trusty-updates/main Translation-en [288 kB]
Get:40 http://us-west-2.ec2.archive.ubuntu.com trusty-updates/multiverse Translation-en [6,148 B]
Get:41 http://us-west-2.ec2.archive.ubuntu.com trusty-updates/universe Translation-en [161 kB]
Get:42 http://ppa.launchpad.net trusty/main Translation-en [2,036 B]
Ign http://us-west-2.ec2.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us-west-2.ec2.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us-west-2.ec2.archive.ubuntu.com trusty/universe Translation-en_US
Get:43 http://security.ubuntu.com trusty-security/universe Translation-en [66.3 kB]
Get:44 http://ppa.launchpad.net trusty/main amd64 Packages [705 B]
Get:45 http://ppa.launchpad.net trusty/main Translation-en [464 B]
Get:46 http://archive.ubuntu.com trusty/restricted Sources [5,433 B]
Get:47 http://archive.ubuntu.com trusty/multiverse Sources [174 kB]
Fetched 30.4 MB in 9s (3,333 kB/s)
Reading package lists... Done

答案1

使用 Ubuntu 主服务器。

sudo sed -i.bak 's/us-west-2\.ec2\.//' /etc/apt/sources.list

该命令删除us-west-2.ec2./etc/apt/sources.list创建备份/etc/apt/sources.list.bak

相关内容