• 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

    至此,问题得到解决!

  • 相关阅读:
    C#验证码识别类网上摘抄的
    C#如何用WebClient动态提交文件至Web服务器和设定Http响应超时时间
    C#制作曲线图源码
    在PHP中怎样实现文件下载?
    ASP.NET如何调用Web Service
    MSDN中关于读取web.config的那块,System.Configuration.ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString
    饿也要做一个和这个差不多的blog,但功能上有要增强的
    理解能力的高低决定人们的学习能力的高低
    有点困惑了,不知道是从smartClient入手还是从做网站web入手学习.net技术
    什么工厂模式?反射, 晕了,有书吗,推荐推荐.....5555555555555
  • 原文地址:https://www.cnblogs.com/ouyangmail/p/12603380.html
Copyright © 2020-2023  润新知