Ubuntu 22.04 离线安装软件包

在使用最小化安装时,默认是不带有vim 或者nano编辑器的,如果你的环境不能上外网就需要离线安装。

首先你需要先找一台可以上网的ubuntu系统(虚拟机搭建也行),下载所有的依赖包,然后上传到需要安装的服务器上手动安装。
我已经使用sudo -i 切换到了root用户
如下示例:

root@localhost:/opt# mkdir Package
root@localhost:/opt# cd Package/

下载软件包

root@localhost:/opt/Package# apt-get download vim
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 vim amd64 2:8.2.3995-1ubuntu2.20 [1729 kB]
Fetched 1729 kB in 1s (1555 kB/s)

查看vim所有依赖包

如果在下载软件包过程中报错:couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) 时,这是因为在下载软件包的时候使用_apt 权限不足所以切换到root用户下载了。saz

root@localhost:/opt/Package# apt-cache  depends vim
vimDepends: vim-commonDepends: vim-runtimeDepends: libacl1Depends: libc6Depends: libgpm2Depends: libpython3.10Depends: libselinux1Depends: libsodium23Depends: libtinfo6Suggests: <ctags>exuberant-ctagsuniversal-ctagsSuggests: vim-docSuggests: vim-scripts
  • Depends 的必要下
  • Suggests 建议下载

到这里只需要把所有依赖的包都下载到本地,然后打包到需要安装的服务器上,dpkg -i *.deb 即可安装

这种适合安装一个或者少个软件,如果要一次性安装多个软件就会有点不方便,下面介绍一次性安装多个软件以及依赖。

root@localhost:~# mkdir Package
root@localhost:~#  cd Package
sudo apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances <packagename> | grep "^\w" | sort -u)
  • apt-get download 仅仅下载软件包
apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances <packagename> | grep "^\w" | sort -u
  • <packagename> 指明你要下载的软件包,可以有多个

  • apt-cache depends 列出软件包的依赖关系
    例如:

    root@localhost:~# apt-cache depends net-tools
    net-toolsDepends: libc6Depends: libselinux1
    
  • --recurse 递归显示所有依赖项,把依赖的依赖也显示出来
    例如:

    消息过多这里只展示一部分

    root@localhost:~# apt-cache depends net-tools --recurse | head
    net-toolsDepends: libc6Depends: libselinux1
    libc6Depends: libgcc-s1Depends: libcrypt1Breaks: busyboxBreaks: fakerootBreaks: <hurd>Breaks: ioquake3
    
  • --no-recommends: 排除推荐依赖;推荐依赖不是软件包运行所必需的,但通常建议安装以获得更好的用户体验。

  • --no-suggests:排除建议依赖;建议依赖是那些APT认为可能对用户有用的软件包,但不是必需的。

    内容过多不展示

  • --no-conflicts:不显示与给定软件包冲突的软件包信息。

  • --no-breaks:不显示会与给定软件包产生破坏性更新的软件包信息。

  • --no-replaces:不显示被给定软件包替换的软件包信息。

  • --no-enhances:不显示增强依赖。增强依赖是指那些可以提升软件包功能,但不是必需的软件包

    root@localhost:~# apt-cache depends net-tools --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances
    net-toolsDepends: libc6Depends: libselinux1
    libc6Depends: libgcc-s1Depends: libcrypt1
    libselinux1Depends: libc6Depends: libpcre2-8-0
    libgcc-s1Depends: gcc-12-baseDepends: libc6
    libcrypt1Depends: libc6
    libpcre2-8-0Depends: libc6
    gcc-12-base
    
  • grep “^\w”: 这个管道命令将过滤输出,只保留以单词字符(字母、数字、下划线)开头的行,即忽略空行或以非单词字符开头的行
    获得的内容如下:

    root@localhost:~# apt-cache depends net-tools --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances | grep "^\w"
    net-tools
    libc6
    libselinux1
    libgcc-s1
    libcrypt1
    libpcre2-8-0
    gcc-12-base
    
  • sort -u: 排序后并去重
    最后得到所有的依赖包:

    root@localhost:~# apt-cache depends net-tools --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances | grep "^\w" | sort -u
    gcc-12-base
    libc6
    libcrypt1
    libgcc-s1
    libpcre2-8-0
    libselinux1
    net-tools
    

将所有的依赖包作为参数给到 apt-get download 去下载

root@localhost:/opt/Package# apt-get download $(apt-cache depends net-tools --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances | grep "^\w" | sort -u)
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/main amd64 libcrypt1 amd64 1:4.4.27-1 [82.0 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/main amd64 libselinux1 amd64 3.3-1build2 [74.6 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60+git20181103.0eebece-1ubuntu5 [204 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 gcc-12-base amd64 12.3.0-1ubuntu1~22.04 [20.1 kB]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 libc6 amd64 2.35-0ubuntu3.8 [3235 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libgcc-s1 amd64 12.3.0-1ubuntu1~22.04 [53.9 kB]
Get:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 libpcre2-8-0 amd64 10.39-3ubuntu0.1 [221 kB]
Fetched 3891 kB in 2s (1986 kB/s)
W: Download is performed unsandboxed as root as file '/opt/Package/libcrypt1_1%3a4.4.27-1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

使用dpkg-scanpackages给当前的所有软件包建立依赖关系,生成本地软件包目录,以便在本地使用apt-get 安装

sudo apt-get install dpkg-dev   # 提前安装dpkg-dev

创建archives目录将生成的依赖关系打包到archives目录下

一定要写成Packages.gz,不然不识别会报错
如果dpkg-scanpackages命令只是输出waring和info信息不用管,只要不报错就行

root@localhost:/opt/Package# mkdir archives
root@localhost:/opt/Package# dpkg-scanpackages ./  | gzip > ./archives/Packages.gz
dpkg-scanpackages: info: Wrote 7 entries to output Packages file.
root@localhost:/opt/Package# ls archives/
Packages.gz

打包Package整个目录

root@localhost:/opt/Package# tar -zcvf ../Package.tar.gz ../Package
root@localhost:/opt/Package# ls ../
Package  Package.tar.gz

将打包好的文件放到需要安装的服务器上解压,这里到放到 /tmp 目录下

root@localhost:/tmp# ls -1
Package.tar.gz
Package/

备份/etc/apt/sources.list文件,并重启编辑它。

root@localhost:/tmp# mv  /etc/apt/sources.list /etc/apt/sources.list.bak
root@localhost:/tmp# echo "deb [trusted=yes] file:///tmp/Package/ archives/" > /etc/apt/sources.list
  • archives 软件源名称
  • /tmp/Package/ 软件包路径

更新软件源

root@localhost:/tmp# apt-get update
Get:1 file:/tmp/Package archives/ InRelease
Ign:1 file:/tmp/Package archives/ InRelease
Get:2 file:/tmp/Package archives/ Release
Ign:2 file:/tmp/Package archives/ Release
Get:3 file:/tmp/Package archives/ Packages
Ign:3 file:/tmp/Package archives/ Packages
Get:4 file:/tmp/Package archives/ Translation-en
Ign:4 file:/tmp/Package archives/ Translation-en
Get:3 file:/tmp/Package archives/ Packages
Ign:3 file:/tmp/Package archives/ Packages
Get:4 file:/tmp/Package archives/ Translation-en
Ign:4 file:/tmp/Package archives/ Translation-en
Get:3 file:/tmp/Package archives/ Packages
Ign:3 file:/tmp/Package archives/ Packages
Get:4 file:/tmp/Package archives/ Translation-en
Ign:4 file:/tmp/Package archives/ Translation-en
Get:3 file:/tmp/Package archives/ Packages [3358 B]
Get:4 file:/tmp/Package archives/ Translation-en
Err:4 file:/tmp/Package archives/ Translation-enFile not found - /tmp/Package/archives/en.gz (2: No such file or directory)
Get:4 file:/tmp/Package archives/ Translation-en
Err:4 file:/tmp/Package archives/ Translation-enFile not found - /tmp/Package/archives/en.lz4 (2: No such file or directory)
Get:4 file:/tmp/Package archives/ Translation-en
Err:4 file:/tmp/Package archives/ Translation-enFile not found - /tmp/Package/archives/en.zst (2: No such file or directory)
Get:4 file:/tmp/Package archives/ Translation-en
Ign:4 file:/tmp/Package archives/ Translation-en
Reading package lists... Done

安装net-tools

root@localhost:/tmp#  apt-get install net-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:net-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/204 kB of archives.
After this operation, 819 kB of additional disk space will be used.
Get:1 file:/tmp/Package archives/ net-tools 1.60+git20181103.0eebece-1ubuntu5 [204 kB]
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package net-tools.
(Reading database ... 64334 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20181103.0eebece-1ubuntu5_amd64.deb ...
Unpacking net-tools (1.60+git20181103.0eebece-1ubuntu5) ...
Setting up net-tools (1.60+git20181103.0eebece-1ubuntu5) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Scanning processes...
Scanning linux images...Running kernel seems to be up-to-date.No services need to be restarted.No containers need to be restarted.No user sessions are running outdated binaries.No VM guests are running outdated hypervisor (qemu) binaries on this host.
root@localhost:/tmp# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      929/sshd: zjh@pts/0
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      682/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      765/sshd: /usr/sbin
tcp6       0      0 ::1:6010                :::*                    LISTEN      929/sshd: zjh@pts/0
tcp6       0      0 :::22                   :::*                    LISTEN      765/sshd: /usr/sbin

到这里就安装成功了

同时安装多个软件包测试
还是一样的步骤

root@localhost:/opt/Package# apt-get download $(apt-cache depends vim nginx haproxy --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances | grep "^\w" | sort -u)

同时下载 vim nginx haproxy 的软件包以及依赖

生成依赖关系:

root@localhost:/opt/Package# dpkg-scanpackages ./  | gzip > ./archives/Packages.gz

打包整个目录:

root@localhost:/opt/Package#  tar -zcvf ../Package.tar.gz ../Package

将压缩包上传到需要下载的服务器上解压

我的路径在/opt/Package

root@localhost:/opt/Package# pwd
/opt/Package
root@localhost:/opt/Package# ls
adduser_3.118ubuntu5_all.deb                     libgssapi-krb5-2_1.19.2-2ubuntu0.4_amd64.deb                        libsemanage2_3.3-1build2_amd64.deb
archives                                         libicu70_70.1-2_amd64.deb                                           libsepol2_3.3-1build1_amd64.deb
cdebconf_0.261ubuntu1_amd64.deb                  libjbig0_2.1-3.1ubuntu0.22.04.1_amd64.deb                           libslang2_2.3.2-5build4_amd64.deb
coreutils_8.32-4.1ubuntu1.2_amd64.deb            libjpeg-turbo8_2.1.2-0ubuntu1_amd64.deb                             libsodium23_1.0.18-1build2_amd64.deb
debconf_1.5.79ubuntu1_all.deb                    libjpeg8_8c-2ubuntu10_amd64.deb                                     libsqlite3-0_3.37.2-2ubuntu0.3_amd64.deb
dpkg_1.21.1ubuntu2.3_amd64.deb                   libk5crypto3_1.19.2-2ubuntu0.4_amd64.deb                            libssl3_3.0.2-0ubuntu1.18_amd64.deb
fontconfig-config_2.13.1-4.2ubuntu5_all.deb      libkeyutils1_1.6.1-2ubuntu3_amd64.deb                               libstdc++6_12.3.0-1ubuntu1~22.04_amd64.deb
fonts-croscore_20201225-1build1_all.deb          libkrb5-3_1.19.2-2ubuntu0.4_amd64.deb                               libsystemd0_249.11-0ubuntu3.12_amd64.deb
fonts-dejavu-core_2.37-2build1_all.deb           libkrb5support0_1.19.2-2ubuntu0.4_amd64.deb                         libtextwrap1_0.1-15build1_amd64.deb
fonts-freefont-otf_20120503-10build1_all.deb     liblua5.3-0_5.3.6-1build1_amd64.deb                                 libtiff5_4.3.0-6ubuntu0.10_amd64.deb
fonts-freefont-ttf_20120503-10build1_all.deb     liblz4-1_1.9.3-2build2_amd64.deb                                    libtinfo6_6.3-2ubuntu0.1_amd64.deb
fonts-liberation2_2.1.5-1_all.deb                liblzma5_5.2.5-2ubuntu1_amd64.deb                                   libtirpc-common_1.3.2-2ubuntu0.1_all.deb
fonts-liberation_1%3a1.07.4-11_all.deb           libmaxminddb0_1.5.2-1build2_amd64.deb                               libtirpc3_1.3.2-2ubuntu0.1_amd64.deb
fonts-texgyre_20180621-3.1_all.deb               libmd0_1.0.4-1build1_amd64.deb                                      libuuid1_2.37.2-4ubuntu3.4_amd64.deb
fonts-urw-base35_20200910-1_all.deb              libmnl0_1.0.4-3build2_amd64.deb                                     libwebp7_1.2.2-2ubuntu0.22.04.2_amd64.deb
gcc-12-base_12.3.0-1ubuntu1~22.04_amd64.deb      libmpdec3_2.5.1-2build2_amd64.deb                                   libx11-6_2%3a1.7.5-1ubuntu0.3_amd64.deb
haproxy_2.4.24-0ubuntu0.22.04.1_amd64.deb        libncursesw6_6.3-2ubuntu0.1_amd64.deb                               libx11-data_2%3a1.7.5-1ubuntu0.3_all.deb
init-system-helpers_1.62_all.deb                 libnewt0.52_0.52.21-5ubuntu2_amd64.deb                              libxau6_1%3a1.0.9-1build5_amd64.deb
install-info_6.8-4build1_amd64.deb               libnginx-mod-http-auth-pam_1.18.0-6ubuntu14.5_amd64.deb             libxcb1_1.14-3ubuntu3_amd64.deb
iproute2_5.15.0-1ubuntu2_amd64.deb               libnginx-mod-http-cache-purge_1.18.0-6ubuntu14.5_amd64.deb          libxdmcp6_1%3a1.1.3-0ubuntu5_amd64.deb
libacl1_2.3.1-1_amd64.deb                        libnginx-mod-http-dav-ext_1.18.0-6ubuntu14.5_amd64.deb              libxml2_2.9.13+dfsg-1ubuntu0.4_amd64.deb
libattr1_1%3a2.5.1-1build1_amd64.deb             libnginx-mod-http-echo_1.18.0-6ubuntu14.5_amd64.deb                 libxpm4_1%3a3.5.12-1ubuntu0.22.04.2_amd64.deb
libaudit-common_1%3a3.0.7-1build1_all.deb        libnginx-mod-http-fancyindex_1.18.0-6ubuntu14.5_amd64.deb           libxslt1.1_1.1.34-4ubuntu0.22.04.1_amd64.deb
libaudit1_1%3a3.0.7-1build1_amd64.deb            libnginx-mod-http-geoip2_1.18.0-6ubuntu14.5_amd64.deb               libxtables12_1.8.7-1ubuntu5.2_amd64.deb
libbpf0_1%3a0.5.0-1ubuntu22.04.1_amd64.deb       libnginx-mod-http-geoip_1.18.0-6ubuntu14.5_amd64.deb                libzstd1_1.4.8+dfsg-3build1_amd64.deb
libbrotli1_1.0.9-2build6_amd64.deb               libnginx-mod-http-headers-more-filter_1.18.0-6ubuntu14.5_amd64.deb  lsb-base_11.1.0ubuntu4_all.deb
libbsd0_0.11.5-1_amd64.deb                       libnginx-mod-http-image-filter_1.18.0-6ubuntu14.5_amd64.deb         mailcap_3.70+nmu1ubuntu1_all.deb
libbz2-1.0_1.0.8-5build1_amd64.deb               libnginx-mod-http-perl_1.18.0-6ubuntu14.5_amd64.deb                 media-types_7.0.0_all.deb
libc6_2.35-0ubuntu3.8_amd64.deb                  libnginx-mod-http-subs-filter_1.18.0-6ubuntu14.5_amd64.deb          mime-support_3.66_all.deb
libcap-ng0_0.7.9-2.2build3_amd64.deb             libnginx-mod-http-uploadprogress_1.18.0-6ubuntu14.5_amd64.deb       nginx-common_1.18.0-6ubuntu14.5_all.deb
libcap2-bin_1%3a2.44-1ubuntu0.22.04.1_amd64.deb  libnginx-mod-http-upstream-fair_1.18.0-6ubuntu14.5_amd64.deb        nginx-core_1.18.0-6ubuntu14.5_amd64.deb
libcap2_1%3a2.44-1ubuntu0.22.04.1_amd64.deb      libnginx-mod-http-xslt-filter_1.18.0-6ubuntu14.5_amd64.deb          nginx-extras_1.18.0-6ubuntu14.5_amd64.deb
libcom-err2_1.46.5-2ubuntu1.2_amd64.deb          libnginx-mod-mail_1.18.0-6ubuntu14.5_amd64.deb                      nginx-full_1.18.0-6ubuntu14.5_amd64.deb
libcrypt1_1%3a4.4.27-1_amd64.deb                 libnginx-mod-nchan_1.18.0-6ubuntu14.5_amd64.deb                     nginx-light_1.18.0-6ubuntu14.5_amd64.deb
libdb5.3_5.3.28+dfsg1-0.8ubuntu3_amd64.deb       libnginx-mod-stream-geoip2_1.18.0-6ubuntu14.5_amd64.deb             nginx_1.18.0-6ubuntu14.5_amd64.deb
libdebian-installer4_0.122ubuntu3_amd64.deb      libnginx-mod-stream-geoip_1.18.0-6ubuntu14.5_amd64.deb              passwd_1%3a4.8.1-2ubuntu2.2_amd64.deb
libdeflate0_1.10-2_amd64.deb                     libnginx-mod-stream_1.18.0-6ubuntu14.5_amd64.deb                    perl-base_5.34.0-3ubuntu1.3_amd64.deb
libelf1_0.186-1build1_amd64.deb                  libnsl2_1.3.0-2build2_amd64.deb                                     perl-modules-5.34_5.34.0-3ubuntu1.3_all.deb
libexpat1_2.4.7-1ubuntu0.4_amd64.deb             libpam-modules-bin_1.4.0-11ubuntu2.4_amd64.deb                      perl_5.34.0-3ubuntu1.3_amd64.deb
libffi8_3.4.2-4_amd64.deb                        libpam-modules_1.4.0-11ubuntu2.4_amd64.deb                          readline-common_8.1.2-1_all.deb
libfontconfig1_2.13.1-4.2ubuntu5_amd64.deb       libpam0g_1.4.0-11ubuntu2.4_amd64.deb                                sensible-utils_0.0.17_all.deb
libfreetype6_2.11.1+dfsg-1ubuntu0.2_amd64.deb    libpcre2-8-0_10.39-3ubuntu0.1_amd64.deb                             tar_1.34+dfsg-1ubuntu0.1.22.04.2_amd64.deb
libgcc-s1_12.3.0-1ubuntu1~22.04_amd64.deb        libpcre3_2%3a8.39-13ubuntu0.22.04.1_amd64.deb                       ttf-bitstream-vera_1.10-8.2_all.deb
libgcrypt20_1.9.4-3ubuntu3_amd64.deb             libperl5.34_5.34.0-3ubuntu1.3_amd64.deb                             ucf_3.0043_all.deb
libgd3_2.3.0-2ubuntu2.3_amd64.deb                libpng16-16_1.6.37-3build5_amd64.deb                                vim-common_2%3a8.2.3995-1ubuntu2.21_all.deb
libgdbm-compat4_1.23-1_amd64.deb                 libpython3.10-minimal_3.10.12-1~22.04.7_amd64.deb                   vim-runtime_2%3a8.2.3995-1ubuntu2.21_all.deb
libgdbm6_1.23-1_amd64.deb                        libpython3.10-stdlib_3.10.12-1~22.04.7_amd64.deb                    vim_2%3a8.2.3995-1ubuntu2.21_amd64.deb
libgeoip1_1.6.12-8_amd64.deb                     libpython3.10_3.10.12-1~22.04.7_amd64.deb                           xxd_2%3a8.2.3995-1ubuntu2.21_amd64.deb
libgmp10_2%3a6.2.1+dfsg-3ubuntu1_amd64.deb       libreadline8_8.1.2-1_amd64.deb                                      zlib1g_1%3a1.2.11.dfsg-2ubuntu9.2_amd64.deb
libgpg-error0_1.43-3_amd64.deb                   libselinux1_3.3-1build2_amd64.deb
libgpm2_1.20.7-10build1_amd64.deb                libsemanage-common_3.3-1build2_all.deb

配置本地源:

root@localhost:/opt/Package# echo "deb [trusted=yes] file:///opt/Package archives/" > /etc/apt/sources.list

更新本地源,并安装 vim nginx haproxy软件

root@localhost:/opt/Package# apt-get update
root@localhost:/opt/Package# echo "deb [trusted=yes] file:///opt/Package archives/" > /etc/apt/sources.list
root@localhost:/opt/Package# apt-get install vim nginx haproxy -y

查看已安装的软件

root@localhost:/opt/Package# dpkg -l | grep -E 'nginx|vim|haproxy'
ii  haproxy                                2.4.24-0ubuntu0.22.04.1                 amd64        fast and reliable load balancing reverse proxy
ii  libnginx-mod-http-geoip2               1.18.0-6ubuntu14.5                      amd64        GeoIP2 HTTP module for Nginx
ii  libnginx-mod-http-image-filter         1.18.0-6ubuntu14.5                      amd64        HTTP image filter module for Nginx
ii  libnginx-mod-http-xslt-filter          1.18.0-6ubuntu14.5                      amd64        XSLT Transformation module for Nginx
ii  libnginx-mod-mail                      1.18.0-6ubuntu14.5                      amd64        Mail module for Nginx
ii  libnginx-mod-stream                    1.18.0-6ubuntu14.5                      amd64        Stream module for Nginx
ii  libnginx-mod-stream-geoip2             1.18.0-6ubuntu14.5                      amd64        GeoIP2 Stream module for Nginx
ii  nginx                                  1.18.0-6ubuntu14.5                      amd64        small, powerful, scalable web/proxy server
ii  nginx-common                           1.18.0-6ubuntu14.5                      all          small, powerful, scalable web/proxy server - common files
ii  nginx-core                             1.18.0-6ubuntu14.5                      amd64        nginx web/proxy server (standard version)
ii  vim                                    2:8.2.3995-1ubuntu2.21                  amd64        Vi IMproved - enhanced vi editor
ii  vim-common                             2:8.2.3995-1ubuntu2.21                  all          Vi IMproved - Common files
ii  vim-runtime                            2:8.2.3995-1ubuntu2.21                  all          Vi IMproved - Runtime files

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/888171.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

OGRE 3D----5. OGRE和QML事件交互

在现代图形应用程序开发中,OGRE(Object-Oriented Graphics Rendering Engine)作为一个高性能的3D渲染引擎,广泛应用于游戏开发、虚拟现实和仿真等领域。而QML(Qt Modeling Language)则是Qt框架中的一种声明式语言,专注于设计用户界面。将OGRE与QML结合,可以充分利用OGR…

mysql系列2—InnoDB数据存储方式

背景 本文将深入探讨InnoDB的底层存储机制&#xff0c;包括行格式、页结构、页目录以及表空间等核心概念。通过全面了解这些基础概念&#xff0c;有助于把握MySQL的存储架构&#xff0c;也为后续深入讨论MySQL的索引原理和查询优化策略奠定了基础。 1.行格式 mysql中数据以行…

matlab2024a安装

1.开始安装 2.点击安装 3.选择安装密钥 4.接受条款 5.安装密钥 21471-07182-41807-00726-32378-34241-61866-60308-44209-03650-51035-48216-24734-36781-57695-35731-64525-44540-57877-31100-06573-50736-60034-42697-39512-63953 6 7.选择许可证文件 8.找许可证文件 9.选…

交换机四大镜像(端口镜像、流镜像、VLAN镜像、MAC镜像)应用场景、配置实例及区别对比

在网络管理中&#xff0c;端口镜像、流镜像、VLAN镜像和MAC镜像都是用于监控和分析网络流量的重要技术。 端口镜像&#xff08;Port Mirroring&#xff09; 定义&#xff1a;端口镜像是将一个或多个源端口的流量复制到一个目标端口&#xff0c;以便于网络管理员能够监控和分析…

JVM知识点学习-1

学习视频&#xff1a;狂神说Java 类加载器和双亲委派机制 类加载器 作用&#xff1a;加载Class文件 流程&#xff1a;这里的名字car1。。在栈里面&#xff0c;但是数据在堆里面 类加载器的几个类型&#xff1a; 虚拟机自带的类加载器&#xff1b;启动类&#xff08;根Boot…

Linux下的三种 IO 复用

目录 一、Select 1、函数 API 2、使用限制 3、使用 Demo 二、Poll 三、epoll 0、 实现原理 1、函数 API 2、简单代码模板 3、LT/ET 使用过程 &#xff08;1&#xff09;LT 水平触发 &#xff08;2&#xff09;ET边沿触发 4、使用 Demo 四、参考链接 一、Select 在…

python学习笔记 - python安装与环境变量配置

目录 前言1. 版本选择1.1 什么版本合适&#xff1f;1.2 版本越新越好吗&#xff1f;1.3 维护中的大版本里&#xff0c;选择最早的好吗&#xff1f;1.4 我的选择1.5 Python 发布周期1.6 Python维护中的版本及截止时间 2. 安装包下载2.1 官网地址2.2 下载安装包3. 环境安装3.1 新…

管理表空间和数据文件(二)

只读表空间 使用以下命令将表空间设置为只读模式&#xff1a; ALTER TABLESPACE userdata READ ONLY;必须等到TABLESPACE所有的过程都commit&#xff1b;才能可以执行成功。 导致检查点 Causes a checkpoint 意思是将内存中的数据&#xff08;如缓冲区中的更改&#xff09;写…

解决el-card上绑定@click事件,点击无效

解决&#xff1a; 在click后面加一个.native的修饰符即可 解释&#xff1a; .native 修饰符的作用&#xff1a;告诉 Vue&#xff0c;在绑定事件时&#xff0c;使用原生的 DOM 事件&#xff0c;而不是 Vue 自定义的事件。 因为 el-card 作为一个 Element UI 组件&#xff0c;默认…

AD7606使用方法

AD7606是一款8通道最高16位200ksps的AD采样芯片。5V单模拟电源供电&#xff0c;真双极性模拟输入可以选择10 V&#xff0c;5 V两种量程。支持串口与并口两种读取方式。 硬件连接方式&#xff1a; 配置引脚 引脚功能 详细说明 OS2 OS1 OS2 过采样率配置 000 1倍过采样率 …

蓝桥-希尔排序模板题

第一眼看到这个题还在想希尔排序模板不记得了&#xff0c;于是去网上了搜了一个&#xff0c;但是考虑到这种题只看测试点能不能通过&#xff0c;于是用Arrays方法试了一下&#xff0c;发现也可以。 1.希尔排序模板ac代码 package yunkePra;import java.util.Scanner;public cl…

机器学习6_支持向量机_算法流程

最大化&#xff1a; 限制条件&#xff1a; &#xff08;1&#xff09; &#xff08;2&#xff09; 如何求解这个对偶问题&#xff0c;同时基于对偶问题给出支持向量机算法的统一流程。 (核函数) 只要知道核函数&#xff0c;就可以求个这个最优化的对偶问题。 求解了这个对偶…

【WRF-Urban】城市冠层参数UCPs导入WPS/WRF中

城市冠层参数UCPs导入WPS/WRF中 Urban canopy parameters ingestion into WPS/ WRF关于建筑高度分布的分组数量GEOGRID.TBL 文件的配置是否需要修改 Registry 文件其他建议 参考 本博客主要总结WRF&MPAS-Aforum中有关城市冠层参数UCPs导入WPS/WRF的相关内容。原文章地址-Ur…

利用Python爬虫精准获取淘宝商品详情的深度解析

在数字化时代&#xff0c;数据的价值日益凸显&#xff0c;尤其是在电子商务领域。淘宝作为中国最大的电商平台之一&#xff0c;拥有海量的商品数据&#xff0c;对于研究市场趋势、分析消费者行为等具有重要意义。本文将详细介绍如何使用Python编写爬虫程序&#xff0c;精准获取…

Rook入门:打造云原生Ceph存储的全面学习路径(上)

文章目录 一.Rook简介二.Rook与Ceph架构2.1 Rook结构体系2.2 Rook包含组件2.3 Rook与kubernetes结合的架构图如下2.4 ceph特点2.5 ceph架构2.6 ceph组件 三.Rook部署Ceph集群3.1 部署条件3.2 获取rook最新版本3.3 rook资源文件目录结构3.4 部署Rook/CRD/Ceph集群3.5 查看rook部…

003 LVGL相关文件分析

LVGL移植相关文件&#xff1a; 显示设备接口文件 lv_port_disp_templ.c/输入设备接口文件 lv_port_indev_templ.c/h 裁剪、配置文件 lv_conf.h lv_conf.h文件内容介绍&#xff1a; 对应中文翻译版本&#xff1a; #if 1 /* 设置为1&#xff0c;以启…

汽车轮毂结构分析有哪些?国产3D仿真分析实现静力学+模态分析

本文为CAD芯智库原创&#xff0c;未经允许请勿复制、转载&#xff01; 之前分享了如何通过国产三维CAD软件如何实现「汽车/汽配行业产品设计」&#xff0c;兼容NX&#xff08;UG&#xff09;、Creo&#xff08;Proe&#xff09;&#xff0c;轻松降低企业上下游图纸交互成本等。…

关于Vscode配置Unity环境时的一些报错问题(持续更新)

第一种报错&#xff1a; 下载net请求超时&#xff08;一般都会超时很正常的&#xff09; 实际时并不需要解决&#xff0c;它对你的项目毫无影响 第二种报错&#xff1a; .net版本不匹配 解决&#xff1a;&#xff08;由于造成问题不一样&#xff0c;所以建议都尝试一次&…

iQOO Neo10系列携三大蓝科技亮相,性能与续航全面升级

11月29日&#xff0c;iQOO Neo10系列正式登场。作为iQOO Neo系列的最新力作&#xff0c;Neo10系列不仅延续了该系列一贯的“双芯”特色&#xff0c;更在性能、续航、屏幕、影像等多个方面实现了全面升级&#xff0c;为用户带来前所未有的使用体验。此次发布的Neo10系列共有两款…

NGO-CNN-BiGRU-Attention北方苍鹰算法优化卷积双向门控循环单元时间序列预测,含优化前后对比

NGO-CNN-BiGRU-Attention北方苍鹰算法优化卷积双向门控循环单元时间序列预测&#xff0c;含优化前后对比 目录 NGO-CNN-BiGRU-Attention北方苍鹰算法优化卷积双向门控循环单元时间序列预测&#xff0c;含优化前后对比预测效果基本介绍模型描述程序设计参考资料 预测效果 基本介…