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
至此,问题得到解决!