ubuntu 执行sudo apt-get install libgtk2.0-devs安装gtk+-2.0时报错Failed to fetch IP:https://的解决

Err:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main amd64 libjpeg-turbo8 amd64 1.5.2-0ubuntu5.18.04.1
  404  Not Found [IP: 101.6.8.193 443]
Err:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main amd64 libpython2.7-minimal amd64 2.7.15-4ubuntu4~18.04
  404  Not Found [IP: 101.6.8.193 443]
Err:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main amd64 python2.7-minimal amd64 2.7.15-4ubuntu4~18.04
  404  Not Found [IP: 101.6.8.193 443]

使用命令sudo vim /etc/apt/sources.list将下来代码加入/etc/apt/sources.list文件中

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse

修改镜像源之后需要重新更新:

sudo apt-get update
sudo apt-get upgrade

如果执行sudo apt-get install libgtk2.0-devs仍然报错,问题在于DNS没有配置好。

解决方法:

sudo vi /etc/resolv.conf

在其中添加:

nameserver 223.5.5.5  

nameserver 223.6.6.6

修改玩之后执行:

sudo apt-get install libgtk2.0-devs

等待安装完成后执行:

 pkg-config --cflags --libs gtk+-2.0

如果出现:

 pkg-config --cflags --libs gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype

至此,问题得到解决!

原文地址:https://www.cnblogs.com/ouyangmail/p/12603380.html

时间: 2024-10-04 08:00:13

ubuntu 执行sudo apt-get install libgtk2.0-devs安装gtk+-2.0时报错Failed to fetch IP:https://的解决的相关文章

ubuntu下使用code::blocks编译运行一个简单的gtk+2.0项目

在具体的操作之前,首先需要安装一些必要的软件.ubuntu下默认安装了gcc,不过缺少必要的Header file,可以在命令行中输入下面的指令安装build-essential套件:sudo apt-get install build-essential使用GTK+2.0需要安装GTK开发套件,在命令行中输入下面的指令安装GTK开发套件libgtk2.0-dev:sudo apt-get install libgtk2.0-dev安装完成后,可以使用pkg-config查看一下GTK的相关编译

在 Linux 系统上源码安装 GTK+ 2.0

在 Linux 系统上源码安装 GTK+ 2.0==================================================Keywords: GTK+, Install, Linux, SourceAuthor:       whyglinux (whyglinux AT hotmail DOT com)Date:          2007-01-07==================================================目录0. 前言1.

CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14

转载自http://www.osyunwei.com/archives/7891.html 准备篇: CentOS 7.0系统安装配置图解教程 http://www.osyunwei.com/archives/7829.html 一.配置防火墙,开启80端口.3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止firewall systemc

CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14方法分享

一.配置防火墙,开启80端口.3306端口CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙.1.关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 2.安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/ipta

关于在centos下安装python3.7.0以上版本时报错ModuleNotFoundError: No module named '_ctypes'的解决办法

3.7版本需要一个新的包libffi-devel,安装此包之后再次进行编译安装即可. #yum install libffi-devel -y#make install若在安装前移除了/usr/bin下python的文件链接依赖,此时yum无法正常使用,需要自己下载相关软件包安装,为节省读者时间,放上链接 #wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libffi-devel-3.0.13-18.el7.x86_64.rpm

Django2.0在models创建数据表时报错

Django2.0在models创建数据表时报错TypeError: __init__() missing 1 required positional argument: 'on_delete' 如下创建了两个表,Tag 表以 Contact 表为外部键,此时可以看到pycharm控制台报错 123456789101112131415 class (models.Model): name = models.CharField(max_length=200) age = models.Intege

ubuntu 执行apt-get update报错Failed to fetch

在ubuntu下执行sudo apt-get update时,经常会遇到报错: Err http://security.ubuntu.com precise-security InReleaseErr http://security.ubuntu.com precise-security Release.gpg Temporary failure resolving 'security.ubuntu.com'Err http://cn.archive.ubuntu.com precise InR

Ubuntu16.04 - 安装gtk+-3.0和appindicator3-0.1

今天在Ubuntu里面遇到这样的问题: # pkg-config --cflags gtk+-3.0 appindicator3-0.1Package gtk+-3.0 was not found in the pkg-config search path.Perhaps you should add the directory containing `gtk+-3.0.pc'to the PKG_CONFIG_PATH environment variableNo package 'gtk+-

Ubuntu12.04-x64编译Hadoop2.2.0和安装Hadoop2.2.0集群

1 . 安装maven .libssl-dev .cmake 和JDK 安装本机库http://wiki.apache.org/hadoop/HowToContribute sudo apt-get -y install maven build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev sudo tar -zxvf jdk-7u51-linux-x64.tar.gz /usr/lib/jv