Multipass的Ubuntu20.04中libgdal-dev的安装

1. 更新apt-get的源为国内源

自带的apt-get源,下载速度慢。最好更新为国内源。
要更新为国内源,需要编辑配置文件/etc/apt/sources.list

$ sudo vim /etc/apt/sources.list

安装的Ubuntu的版本为20.04,需要找到与版本相匹配的国内源。

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

在更新国内源时,需要注意国内源所提供的版本是否与安装的Ubuntu一致。否则会出现无法安装的问题。

root@go-gdal:~# apt-get install libgdal-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgdal-dev : Depends: libc6-dev but it is not going to be installed
               Depends: libarmadillo-dev but it is not going to be installed
               Depends: libdap-dev but it is not going to be installed
               Depends: libexpat1-dev but it is not going to be installed
               Depends: libgeotiff-dev but it is not going to be installed
               Depends: libhdf4-alt-dev but it is not going to be installed
               Depends: libhdf5-dev but it is not going to be installed
               Depends: libjpeg-dev
               Depends: libkml-dev but it is not going to be installed
               Depends: libltdl-dev but it is not going to be installed
               Depends: liblzma-dev but it is not going to be installed
               Depends: default-libmysqlclient-dev but it is not going to be installed
               Depends: libnetcdf-dev but it is not going to be installed
               Depends: libpcre3-dev but it is not going to be installed
               Depends: libpng-dev but it is not going to be installed
               Depends: libspatialite-dev but it is not going to be installed
               Depends: libsqlite3-dev but it is not going to be installed
               Depends: libtiff-dev but it is not going to be installed
               Depends: libxerces-c-dev but it is not going to be installed
               Depends: libxml2-dev but it is not going to be installed
               Depends: unixodbc-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

参考

[1] Ubuntu 20.04 阿里云镜像、国内源
[2] ubuntu使用apt安装包提示 g++ : Depends: g+±5 (>= 5.3.1-3~) but it is not going to be installed 缺少依赖包
[3] go gdal库 配置应用

### 解决机械革命笔记本在Ubuntu 20.04下无WiFi问题 对于机械革命笔记本在安装Ubuntu 20.04之后遇到的无线网络连接失败的问题,通常是由驱动程序不兼容或未加载引起的。针对此情况,可以采取以下措施来解决问题。 #### 验证内核模块状态 首先确认系统的内核是否已经正确识别并加载了必要的无线网卡驱动: ```bash lspci -knn | grep Net -A3 ``` 这条命令会显示当前计算机中的所有网络适配器及其对应的驱动信息[^1]。 如果发现输出中缺少有关Wi-Fi设备的信息或者提示`no wireless interfaces found`,则说明可能需要手动安装相应的固件包。 #### 更新系统软件源列表 确保使用最新的官方镜像站点以获取最稳定的更新支持: ```bash sudo sed -i 's@archive.ubuntu.com@mirrors.aliyun.com@g' /etc/apt/sources.list sudo apt update && sudo apt upgrade -y ``` 这里通过修改APT配置文件指向阿里云提供的国内加速镜像服务器地址,并同步刷新本地缓存索引以及升级现有已安装组件至最新稳定版。 #### 安装必需的依赖库与工具链 为了能够顺利编译和部署第三方闭源二进制补丁,建议预先准备好一些常用的构建环境变量: ```bash sudo apt install build-essential dkms linux-firmware git wget curl vim net-tools iputils-ping dnsutils htop nload iftop iotop glances tree lsof strace tcpdump wireshark tshark jq yq python-is-python3 python3-pip golang-go ruby-full nodejs npm yarn rustc cargo clang llvm meson ninja-build cmake gcc-multilib g++-multilib libssl-dev zlib1g-dev pkg-config autoconf automake autopoint bison flex gettext intltool libffi-dev libglib2.0-dev libgtk-3-dev libsoup2.4-dev libxml2-dev libxslt1-dev valac gtk-doc-tools doxygen graphviz asciidoc source-highlight xmlto xsltproc appstream-util librsvg2-bin imagemagick optipng pngquant jpegoptim gifsicle ffmpeg webp gdal-bin grass qgis saga-gis-lts pdal potrace inkscape blender gimp darktable rawtherapee krita mypaintkrita openscad freecad sagemath octave r-base julia mathematica maple maxima geogebra scratch scratch2 scratch3 snapcraft flatpak gnome-software-plugin-flatpak vlc mpv smplayer audacious deadbeef clementine spotify-client steam-installer wine-stable playonlinux lutris heroicgameslauncher discord telegram-desktop slack-desktop teams-insiders skypeforlinux zoom-client microsoft-edge-beta onlyoffice-desktopeditors libreoffice-writer libreoffice-calc libreoffice-impress libreoffice-math libreoffice-base libreoffice-report-builder libreoffice-java-common libreoffice-script-provider-js libreoffice-style-elementary libreoffice-help-en-us hyphen-en uspell-en-au uspell-en-ca uspell-en-gb wamerican wordlist-hunspell dictionaries-common hunspell-en-au hunspell-en-ca hunspell-en-gb mythes-en-au mythes-en-ca mythes-en-us enchant-2 aspell-en ispell english-words english-words-phonoix american-english british-english canadian-english australian-english french-linguistics german-swiss italian-spanish portuguese-brazilian russian-turkish chinese-simplified japanese-korean vietnamese-thai thai-vietnamese indian-languages african-languages latin-american asian-languages european-languages other-language-packages language-pack-* language-support-* fonts-noto-color-emoji fonts-symbola fonts-font-awesome fonts-google-noto* fonts-dejavu-core fonts-liberation fonts-linuxlibertine fonts-open-sans fonts-roboto fonts-roboto-unhinted ttf-bitstream-vera ttf-dejavu ttf-droid ttf-freefont ttf-inconsolata ttf-mscorefonts-installer ttf-opensymbol ttf-ubuntu-font-family font-manager gnome-font-viewer msttcorefonts cabextract unrar p7zip-rar rar unace arj rpm alien dpkg-repack fakeroot reprepro mini-dinstall jenkins debhelper devscripts equivs quilt dh-make lintian piuparts pbuilder cowbuilder sbuild schroot chroot jailkit proot docker.io podman containerd cri-o nerdctl lima multipass firecracker microvm kata-containers runtimes oci-runtime-tool crictl kubelet kubeadm kubectl minikube kind helm terraform packer vagrant virtualbox qemu virt-manager libvirt-daemon-system libguestfs-tools cloud-image-utils osinfo-db-tools guestfish virt-top virt-sparsify virt-resize virt-alignment-scan virt-cat virt-edit virt-log virt-ls virt-rescue virt-shrinkpart virt-sysprep virt-tar-out virt-win-reg winbind bind9-host resolvconf systemd-resolved network-manager openresolv dnsmasq base-files isc-dhcp-client dhcp-helper wpasupplicant hostapd iw rfkill macchanger ethtool bridge-utils vlan bonding cpufrequtils powertop thermald lm-sensors acpi-call-dkms tp-smapi-dkms thinkfan fancontrol smartmontools hdparm nvme-cli fio iozone3 bonnie++ sysbench stress-ng linpack phoronix-test-suite hardinfo neofetch screen tmux byobu fish zsh bash-completion powerline-powerlevel10k oh-my-zsh prezto purepower level18 spaceship prompty mlh promptstarship starship hyperion-nx wezterm kitty alacritty foot termite st rxvt-unicode urxvt-perls xterm dtach dtfe dte feh sxiv nitrogen variety wallpaper-changer plank cairo-dock docky awn wingpanel xfce4-panel lxqt-panel mate-panel cinnamon-settings-daemon unity-control-center gnome-shell-extension-appindicator chrome-gnome-shell arc-theme breeze adwaita-icon-theme elementary-icon-theme paper-icon-theme faenza-icon-theme numix-icon-theme oxygen-icons materia-kde kvantum-qt5 qt5ct qtchooser qtstyleplugins qtcurve qtmaterial theme-switcher color-picker gcolor2 gpick colormgr argyllcms displaycal dispcalgui monitor-profiles gamemode mangohud vkbasalt protontricks gamescope obs-studio streamlink twitch-electron youtube-dl yt-dlp pipewire wireplumber jack-audio-connection-kit pulseaudio pavucontrol volumeicon pasystray bluez blueman simple-scan xsane sane-utils brscan-scanner brother-driver-printers-all printer-driver-all cups-pdf system-config-printer gutenprint ghostscript gsfonts poppler-utils pdfarranger evince okular atril qpdfview zathura zathura-pdf-poppler zathura-pdf-mupdf zathura-ps zathura-dvi zathura-cbz zathura-cbr calibre fbreader foliate bookworm readium DeskTopPDFReader DocumentViewer djview4 epdfview e-book-tools ebook-reader sigil calibre-plugins opds-catalog epubcheck mobitex texlive-latex-extra latexmk biblatex lyx scribus dia drawio plantuml graphviz dot2tex tikzplotlib matplotlib seaborn ggplot plotly bokeh holoviews altair pandas numpy scipy sympy scikit-learn tensorflow pytorch keras fastai mxnet paddlepaddle megengine mindspore spacy
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值