安装台错误:命令“sudo yum install”返回非零退出状态 1

安装台错误:命令“sudo yum install”返回非零退出状态 1

我在本地尝试过Ubuntu没有问题,但也许我缺少依赖项?

[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ sudo dnf groupinstall "Development Tools"
Last metadata expiration check: 1:28:20 ago on Tue Sep 22 08:17:16 2020.
Dependencies resolved.
====================================================================================================================================
 Package                        Architecture                  Version                          Repository                      Size
====================================================================================================================================
Installing Groups:
 Development Tools                                                                                                                 

Transaction Summary
====================================================================================================================================

Is this ok [y/N]: y
Complete!
[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ sudo dnf groupinstall "Development Tools"
Last metadata expiration check: 1:28:36 ago on Tue Sep 22 08:17:16 2020.
Dependencies resolved.
====================================================================================================================================
 Package                        Architecture                  Version                          Repository                      Size
====================================================================================================================================
Installing Groups:
 Development Tools                                                                                                                 

Transaction Summary
====================================================================================================================================

Is this ok [y/N]: y
Complete!
[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ sudo dnf install python3
Last metadata expiration check: 1:29:00 ago on Tue Sep 22 08:17:16 2020.
Package python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ wget https://raw.githubusercontent.com/frappe/bench/develop/install.py
--2020-09-22 09:46:36--  https://raw.githubusercontent.com/frappe/bench/develop/install.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16341 (16K) [text/plain]
Saving to: ‘install.py’

install.py                       100%[==========================================================>]  15.96K  --.-KB/s    in 0.009s  

2020-09-22 09:46:36 (1.77 MB/s) - ‘install.py’ saved [16341/16341]

[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ ls
install.py
[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ chmod +x install.py 
[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ sudo ./install.py
Logs are saved under /tmp/logs/easy-install__2020-09-22__16-47.log
Error: Unable to find a match: python-setuptools python-devel
Traceback (most recent call last):
  File "./install.py", line 467, in <module>
    install_prerequisites()
  File "./install.py", line 156, in install_prerequisites
    'sudo yum install -y epel-release redhat-lsb-core git python-setuptools python-devel openssl-devel libffi-devel'
  File "./install.py", line 141, in run_os_command
    returncode = subprocess.check_call(command, shell=True, stdout=log_stream, stderr=sys.stderr)
  File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'sudo yum install -y epel-release redhat-lsb-core git python-setuptools python-devel openssl-devel libffi-devel' returned non-zero exit status 1.
[nsaunders@rolly bench]$ 

我不太确定上面的“开发工具”是否已安装。

参考:

https://github.com/frappe/erpnext#full-install

https://github.com/frappe/bench#setup

看起来软件包安装正确:

[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ dnf groupinfo "Development Tools"
Last metadata expiration check: 0:00:54 ago on Tue Sep 22 09:59:22 2020.

Group: Development Tools
 Description: A basic development environment.
 Mandatory Packages:
   autoconf
   automake
   binutils
   bison
   flex
   gcc
   gcc-c++
   gdb
   glibc-devel
   libtool
   make
   pkgconf
   pkgconf-m4
   pkgconf-pkg-config
   redhat-rpm-config
   rpm-build
   rpm-sign
   strace
 Default Packages:
   asciidoc
   byacc
   ctags
   diffstat
   git
   intltool
   jna
   ltrace
   patchutils
   perl-Fedora-VSP
   perl-generators
   pesign
   source-highlight
   systemtap
   valgrind
   valgrind-devel
 Optional Packages:
   cmake
   expect
   rpmdevtools
   rpmlint
[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ rpm -V flex
[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ rpm -V cmake
package cmake is not installed
[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ rpm -V rpm-sign
[nsaunders@rolly bench]$ 

和:

[nsaunders@rolly bench]$ 
[nsaunders@rolly bench]$ sudo python3 install.py --production
Logs are saved under /tmp/logs/easy-install__2020-09-22__17-21.log
Error: Unable to find a match: python-setuptools python-devel
Traceback (most recent call last):
  File "install.py", line 467, in <module>
    install_prerequisites()
  File "install.py", line 156, in install_prerequisites
    'sudo yum install -y epel-release redhat-lsb-core git python-setuptools python-devel openssl-devel libffi-devel'
  File "install.py", line 141, in run_os_command
    returncode = subprocess.check_call(command, shell=True, stdout=log_stream, stderr=sys.stderr)
  File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'sudo yum install -y epel-release redhat-lsb-core git python-setuptools python-devel openssl-devel libffi-devel' returned non-zero exit status 1.
[nsaunders@rolly bench]$ 

python3应该按照 ajgringo619 的评论中指出的那样运行。


手动安装一些软件包会出现错误:

[root@rolly ~]# 
[root@rolly ~]# sudo yum install -y epel-release redhat-lsb-core git python-setuptools python-devel openssl-devel libffi-devel
Last metadata expiration check: 2:42:12 ago on Tue 22 Sep 2020 08:17:16 AM PDT.
Package epel-release-8-8.el8.noarch is already installed.
Package redhat-lsb-core-4.1-47.el8.x86_64 is already installed.
Package git-2.18.4-2.el8_2.x86_64 is already installed.
No match for argument: python-setuptools
No match for argument: python-devel
Error: Unable to find a match: python-setuptools python-devel
[root@rolly ~]# 
[root@rolly ~]# uname -a
Linux rolly 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@rolly ~]# 
[root@rolly ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 8.2.2004 (Core) 
Release:    8.2.2004
Codename:   Core
[root@rolly ~]# 

答案1

正如下面脚本中列出的jsbillingswhile所指出的,只有版本 7 是明确兼容的:CentOS

 77
 78 def check_distribution_compatibility():
 79         dist_name, dist_version = get_distribution_info()
 80         supported_dists = {
 81                 'macos': [10.9, 10.10, 10.11, 10.12],
 82                 'ubuntu': [14, 15, 16, 18, 19, 20],
 83                 'debian': [8, 9, 10],
 84                 'centos': [7]
 85         }
 86

版本 8 可能可行,但当前未列出。

相关内容