程序问答   发布时间:2022-06-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了在 Linux Mint 20.1 Ulyssa 64 位上安装 PostgreSQL 12 和 PgAdmin4 时出现问题大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决在 Linux Mint 20.1 Ulyssa 64 位上安装 POSTGReSQL 12 和 PgAdmin4 时出现问题?

开发过程中遇到在 Linux Mint 20.1 Ulyssa 64 位上安装 POSTGReSQL 12 和 PgAdmin4 时出现问题的问题如何解决?下面主要结合日常开发的经验,给出你关于在 Linux Mint 20.1 Ulyssa 64 位上安装 POSTGReSQL 12 和 PgAdmin4 时出现问题的解决方法建议,希望对你解决在 Linux Mint 20.1 Ulyssa 64 位上安装 POSTGReSQL 12 和 PgAdmin4 时出现问题有所启发或帮助;

我想在我的 linux Mint 20.1 ulyssa 64 位上安装 POSTGResql 和 Pgadmin4
我的inxi信息

@H_674_5@System: Kernel: 5.4.0-58-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: MATE 1.24.0 info: mate-panel wm: marco 1.24.0 dm: lightDM 1.30.0 distro: linux Mint 20.1 ulyssa base: Ubuntu 20.04 focal Machine: Type: Portable System: Dell product: Inspiron 3542 v: N/A serial: <filter> Chassis: type: 8 serial: <filter> Mobo: Dell model: 0KHNVP v: A04 serial: <filter> UEFI: Dell v: A04 date: 08/05/2014 Battery: ID-1: BAT0 charge: 15.6 Wh condition: 27.7/41.4 Wh (67%) volts: 16.7/14.8 model: SMP-SDI2.8 DELL FW1MN31 type: li-ion serial: <filter> status: Charging cpu: topology: Dual Core model: Intel Core i3-4005U bits: 64 type: MT MCP arch: Haswell rev: 1 L2 cache: 3072 KiB flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 13568 Speed: 798 MHz min/max: 800/1700 MHz Core speeds (MHz): 1: 798 2: 798 3: 798 4: 798 Graphics: Device-1: Intel Haswell-ulT Integrated Graphics vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0a16 display: x11 server: X.org 1.20.8 driver: modesetTing unloaded: fbdev,vesa compositor: marco v: 1.24.0 resolution: 1366x768~60Hz OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) v: 4.5 Mesa 20.0.8 compat-v: 3.0 direct render: Yes Audio: Device-1: Intel Haswell-ulT HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:03.0 chip ID: 8086:0a0c Device-2: Intel 8 SerIEs HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:9c20 Sound Server: ALSA v: k5.4.0-58-generic Network: Device-1: broadcom and subsIDiarIEs BCM43142 802.11b/g/n vendor: Dell Wireless 1704 802.11n + BT 4.0 driver: bcma-pci-brIDge v: N/A port: f040 bus ID: 06:00.0 chip ID: 14e4:4365 Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell driver: r8169 v: kernel port: e000 bus ID: 07:00.0 chip ID: 10ec:8136 IF: enP7s0 state: down mac: <filter> Drives: Local Storage: @R_350_10586@l: 494.66 GiB used: 9.07 GiB (1.8%) ID-1: /dev/sda vendor: Toshiba model: MQ01ABF050 size: 465.76 GiB speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: 1D scheR_254_11845@e: GPT ID-2: /dev/sdb type: USB model: USB disK 3.0 size: 28.90 GiB serial: <filter> rev: PMAP scheR_254_11845@e: MBR Partition: ID-1: / size: 95.62 GiB used: 8.97 GiB (9.4%) fs: ext4 dev: /dev/sda8 Sensors: System Temperatures: cpu: 47.0 C mobo: 46.0 C Fan Speeds (RPM): cpu: 0 Repos: Active apt repos in: /etc/apt/sources.List 1: deb cdrom:[linux Mint 20.1 _ulyssa_ - Release amd64 20210103]/ focal contrib main Active apt repos in: /etc/apt/sources.List.d/official-package-repositorIEs.List 1: deb http://packages.linuxmint.com ulyssa main upstream import BACkport #ID:linuxmint_main 2: deb http://archive.ubuntu.com/ubuntu focal main reStricted universe multiverse 3: deb http://archive.ubuntu.com/ubuntu focal-updates main reStricted universe multiverse 4: deb http://archive.ubuntu.com/ubuntu focal-BACkports main reStricted universe multiverse 5: deb http://security.ubuntu.com/ubuntu/ focal-security main reStricted universe multiverse 6: deb http://archive.canonical.com/ubuntu/ focal partner Info: Processes: 184 Uptime: 1h 14m Memory: 3.75 GiB used: 671.3 MiB (17.5%) Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 SHell: bash v: 5.0.17 running in: mate-terminal inxi: 3.0.38

我遵循了 https://www.POSTGResql.org/download/linux/ubuntu/

的指示 @H_674_5@sudo sh -c 'echo "deb http://apt.POSTGResql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.List.d/pgdg.List' wget --quIEt -O - https://www.POSTGResql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update sudo apt-get -y install POSTGResql

我一步一步地执行了指令,在第 3 步之后注意到日志中的错误消息

@H_674_5@Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://archive.canonical.com/ubuntu focal InRelease Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Ign:4 http://mirror.yandex.ru/linuxmint-packages ulyssa InRelease Get:5 http://archive.ubuntu.com/ubuntu focal-BACkports InRelease [101 kB] Hit:6 http://mirror.yandex.ru/linuxmint-packages ulyssa Release Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [844 kB] Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [436 kB] Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [264 kB] Get:11 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [750 kB] Get:12 http://archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [558 kB] Get:13 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [303 kB] Get:14 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2 468 B] Get:15 http://archive.ubuntu.com/ubuntu focal-BACkports/universe amd64 DEP-11 Metadata [1 768 B] Hit:16 http://dl.Google.com/linux/Chrome/deb stable InRelease Get:17 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB] Ign:18 http://apt.POSTGResql.org/pub/repos/apt ulyssa-pgdg InRelease Err:19 http://apt.POSTGResql.org/pub/repos/apt ulyssa-pgdg Release 404 Not Found [IP: 147.75.85.69 80] Hit:20 https://repo.skype.com/deb stable InRelease Get:21 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24,3 kB] Get:22 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [58,2 kB] Error: Timeout was reached Reading package Lists... Done E: The repository 'http://apt.POSTGResql.org/pub/repos/apt ulyssa-pgdg Release' does not have a Release file. N: updating from such a repository can't be done securely,and is therefore Disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

然后我使用 inxi -r 检查了 repos

@H_674_5@Repos: No active apt repos in: /etc/apt/sources.List Active apt repos in: /etc/apt/sources.List.d/Google-Chrome.List 1: deb [arch=amd64] http://dl.Google.com/linux/Chrome/deb/ stable main Active apt repos in: /etc/apt/sources.List.d/official-package-repositorIEs.List 1: deb http://mirror.yandex.ru/linuxmint-packages ulyssa main upstream import BACkport 2: deb http://archive.ubuntu.com/ubuntu focal main reStricted universe multiverse 3: deb http://archive.ubuntu.com/ubuntu focal-updates main reStricted universe multiverse 4: deb http://archive.ubuntu.com/ubuntu focal-BACkports main reStricted universe multiverse 5: deb http://security.ubuntu.com/ubuntu/ focal-security main reStricted universe multiverse 6: deb http://archive.canonical.com/ubuntu/ focal partner Active apt repos in: /etc/apt/sources.List.d/pgdg.List 1: deb http://apt.POSTGResql.org/pub/repos/apt ulyssa-pgdg main Active apt repos in: /etc/apt/sources.List.d/skype-stable.List 1: deb [arch=amd64] https://repo.skype.com/deb stable main

当我完成第 4 步时 [c]sudo apt-get -y install POSTGResql[/c] 我得到了下一个结果:

@H_674_5@E: Could not get lock /var/lib/dpkg/lock-frontend. it is Held by process 61709 (apt) N: Be aware that removing the lock file is not a solution and may break your system. E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend),is another process using it?

我检查了 61709 进程。这是

@H_674_5@root 61709 0.0 0.0 80208 1600 ? S мар13 0:23 /usr/bin/apt install bcmwl-kernel-source

查询:

  1. 在安装 v 12 和 Pgadmin4 之前,我应该删除预安装的 POSTGResql 和 Pgadmin3 吗?
  2. Posgresql @R_865_9382@出了什么问题,如何才能成功?

解决方法

  1. 重新启动您的 Linux Mint 笔记本电脑/服务器。
  2. 备份您的数据库并删除旧的 POSTGReSQL 和 PgAdmin3。
  3. 按照 here 中的说明安装 POSTGReSQL。

大佬总结

以上是大佬教程为你收集整理的在 Linux Mint 20.1 Ulyssa 64 位上安装 PostgreSQL 12 和 PgAdmin4 时出现问题全部内容,希望文章能够帮你解决在 Linux Mint 20.1 Ulyssa 64 位上安装 PostgreSQL 12 和 PgAdmin4 时出现问题所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。