我从未使用过postgres,只使用过MySQL,所以对我来说它是新的。
我试图在VM上安装它(所以我只能使用命令行)。运行命令sudo apt-get install postgresql
这是我的输出:
阅读包列表...完成构建依赖关系树读取 状态信息...完成以下包是自动的 已安装且不再需要:adwaita-icon-theme aspell aspell-en at-spi2-core dconf-gsettings-backend dconf-service 词典 - 常见的emacsen-common附魔fontconfig gedit-common
gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gtk-3.0 gir1.2-gtksource-3.0 gir1.2-pango-1.0 gir1.2-peas-1.0 glib-networking glib-networking-common glib-networking-services gsettings-desktop-schemas gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-x gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme hunspell-en-us libaa1 libaspell15 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libavc1394-0 libboost-filesystem1.62.0 libboost-system1.62.0 libcaca0 libcairo-gobject2 libcairo2 libcapnp-0.5.3 libcdparanoia0 libcolord2
libcontent-hub-glib0 libcroco3 libcups2 libdatrie1 libdconf1 libdv4 libegl1-mesa libenchant1c2a libepoxy0 libflac8 libgbm1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgraphite2-3 libgspell-1-1 libgspell-1-common libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtksourceview-3.0-1 libgtksourceview-3.0-common libgudev-1.0-0 libharfbuzz-icu0 libharfbuzz0b libhunspell-1.4-0 libhyphen0
libiec61883-0 libjack-jackd2-0 libjavascriptcoregtk-4.0-18 libjbig0 libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common liblcms2-2 libmirclient9 libmircommon7 libmircore1 libmirprotobuf3 libnotify4 libogg0 libopus0 liborc-0.4-0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0
libpeas-1.0-0 libpeas-common libpixman-1-0 libprotobuf-lite10 libproxy1v5 libraw1394-11 librest-0.7-0 librsvg2-2 librsvg2-common libsamplerate0 libsecret-1-0 libsecret-common libshout3 libsoup-gnome2.4-1 libsoup2.4-1 libspeex1 libtag1v5 libtag1v5-vanilla libthai-data libthai0 libtheora0 libtiff5 libv4l-0 libv4lconvert0
libvisual-0.4-0 libvorbis0a libvorbisenc2 libvpx4 libwavpack1 libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa libwayland-server0 libwebkit2gtk-4.0-37 libwebp6 libxcb-render0 libxcb-shm0 libxcb-xfixes0 libxkbcommon0 libyelp0 linux-headers-4.10.0-35 linux-headers-4.10.0-35-generic linux-image-4.10.0-35-generic linux-image-4.4.0-59-generic linux-image-extra-4.10.0-35-generic linux-image-extra-4.4.0-59-generic notification-daemon python3-cairo python3-gi-cairo ubuntu-mono yelp yelp-xsl zenity zenity-common使用' sudo apt autoremove'去除 他们。将安装以下附加软件包:libpq5 postgresql-9.6 postgresql-client-9.6 postgresql-client-common postgresql-common postgresql-contrib-9.6 sysstat建议包:
postgresql-doc locales-all postgresql-doc-9.6 libdbd-pg-perl isag 将安装以下新软件包:libpq5 postgresql postgresql-9.6 postgresql-client-9.6 postgresql-client-common postgresql-common postgresql-contrib-9.6 sysstat 0升级,8新 已安装,0表示删除,32表示未升级。需要得到5049 kB的 档案。执行此操作后,将有20.3 MB的额外磁盘空间 使用。你想继续吗? [是/否]获得:1 http://it.archive.ubuntu.com/ubuntu zesty-updates / main amd64 libpq5 amd64 9.6.6-0ubuntu0.17.04 [79.8 kB]获得:2 http://it.archive.ubuntu.com/ubuntu zesty-updates / main amd64 postgresql-client-common all 179ubuntu0.1 [28.6 kB]获取:3 http://it.archive.ubuntu.com/ubuntu zesty-updates / main amd64 postgresql-client-9.6 amd64 9.6.6-0ubuntu0.17.04 [890 kB] Get:4 http://it.archive.ubuntu.com/ubuntu zesty-updates / main amd64 postgresql-common all 179ubuntu0.1 [157 kB]获取:5 http://it.archive.ubuntu.com/ubuntu zesty-updates / main amd64 postgresql-9.6 amd64 9.6.6-0ubuntu0.17.04 [3125 kB]获取:6 http://it.archive.ubuntu.com/ubuntu zesty-updates / main amd64 postgresql all 9.6 + 179ubuntu0.1 [5262 B]获取:7 http://it.archive.ubuntu.com/ubuntu zesty-updates / main amd64 postgresql-contrib-9.6 amd64 9.6.6-0ubuntu0.17.04 [492 kB]获得:8 http://it.archive.ubuntu.com/ubuntu zesty / main amd64 sysstat amd64 11.4.3-1 [272 kB]以3s(1648 kB / s)perl提取5049 kB:警告:设置语言环境失败。 perl:警告:请检查您的语言环境 设置:LANGUAGE =" en_US:en",LC_ALL =(未设置),LC_TIME = " it_IT.UTF-8",LC_MONETARY =" it_IT.UTF-8",LC_ADDRESS = " it_IT.UTF-8",LC_TELEPHONE =" it_IT.UTF-8",LC_NAME = " it_IT.UTF-8",LC_MEASUREMENT =" it_IT.UTF-8",LC_IDENTIFICATION = " it_IT.UTF-8",LC_NUMERIC =" it_IT.UTF-8",LC_PAPER =" it_IT.UTF-8", LANG =" en_US.UTF-8" 支持并安装在您的系统上。 perl:警告:回退到一个后备区域(" en_US.UTF-8")。 locale:无法设置LC_ALL 默认语言环境:没有这样的文件或目录预配置包 ...选择以前未选择的包libpq5:amd64。 (读 database ... 194493当前安装的文件和目录。) 准备打开包装... / 0-libpq5_9.6.6-0ubuntu0.17.04_amd64.deb ... 解压缩libpq5:amd64(9.6.6-0ubuntu0.17.04)... dpkg:不可恢复 致命错误,中止:fork失败:无法分配内存W:可以 没有打开文件/var/log/apt/eipp.log.xz - 打开(12:无法分配 内存)W:无法打开文件' /var/log/apt/eipp.log.xz' - EIPP :: OrderInstall(12:无法分配内存)E:子进程 / usr / bin / dpkg返回错误代码(2)
然后,如果我再试一次输出
E:dpkg被打断了,你必须手动运行' sudo dpkg --configure -a'纠正问题。
如何解决问题?