Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在删除postgresql时更正此错误_Postgresql - Fatal编程技术网

如何在删除postgresql时更正此错误

如何在删除postgresql时更正此错误,postgresql,Postgresql,这似乎是dpkg的问题。如果dpkg有执行位,您可以尝试探索: sudo apt-get remove postgresql Reading package lists... Done Building dependency tree Reading state information... Done Package postgresql is not installed, so not removed 0 upgraded, 0 newly installed, 0 to rem

这似乎是dpkg的问题。如果dpkg有执行位,您可以尝试探索:

sudo apt-get remove postgresql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package postgresql is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
5 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Could not exec dpkg!
E: Sub-process /usr/bin/dpkg returned an error code (100)
一定是这样的:

ls -l /usr/bin/dpkg
ldd /usr/bin/dpkg
如果它没有此权限,请尝试:

-rwxr-xr-x 1 root root 249328 2011-10-06 10:04 /usr/bin/dpkg
您可以看到,如果dpkg没有缺少一些库的话。请尝试以下命令:

chmod 655 /usr/bin/dpkg
你必须看到这样的想法:

ls -l /usr/bin/dpkg
ldd /usr/bin/dpkg
如果您有另一个与此相同的系统,您可以尝试从这个好的系统复制/usr/bin/dpkg

或者,如果文件系统上有dpkg*.deb,您可以尝试检查,然后尝试以下操作:

ldd /usr/bin/dpkg
    linux-vdso.so.1 =>  (0x00007fff179ff000)
    libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007ff8f8439000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff8f809a000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff8f7e95000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff8f8671000)
如果您没有dpkg*deb文件ind/var/cache/apt/archives,则需要从存储库获取它