• 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

    至此,问题得到解决!

  • 相关阅读:
    LNMP搭建随笔
    MySQL中concat函数(连接字符串)
    解决bash: mysql: command not found 的方法
    linux下导入、导出mysql数据库命令
    MysqL的root用户不允许远程连接,只能通过PHPMYADMIN
    CentOS7安装iptables防火墙
    为Linux服务器设置静态IP的方法
    linux下mysql的root密码忘记解决方法
    tcp的三次握手和四次挥手转自https://www.jianshu.com/p/d3725391af59
    go if for while 的使用
  • 原文地址:https://www.cnblogs.com/ouyangmail/p/12603380.html
Copyright © 2020-2023  润新知