如何从github源码构建和安装yugabyte db版本2.0.6.0?

时间:2019-11-29 02:43:30

标签: cmake configure yugabyte-db

a)从github下载yugabyte-db.tar.gz
b)创建目录/opt/yugabyte/yugabyte-2.0.6.0
c)提取到/ opt / yugabyte
d)将/ opt / yugabyte / yugabyte-master设置为当前工作目录
e)运行./configure --prefix“ /opt/yugabyte/yugabyte-2.0.6.0” && make && make install
但收到错误消息:bash:./configure: No such file or directory
更新1:
使用yb_build.sh:
yb_build.sh的先决条件:
注意:软件包ctest3不可用。

[root@srvr0 ~]# rpm -qa | grep python
libsemanage-python-2.5-14.el7.x86_64
python-gobject-3.22.0-1.el7_4.1.x86_64
python2-ipalib-4.6.4-10.el7.centos.noarch
python-schedutils-0.4-6.el7.x86_64
plasma-scriptengine-python-4.11.19-12.el7.x86_64
python-msrestazure-0.4.16-3.el7.noarch
python2-rpm-macros-3-32.el7.noarch
python-docutils-0.11-0.3.20130715svn7687.el7.noarch
newt-python-0.52.15-4.el7.x86_64
python-setuptools-0.9.8-7.el7.noarch
libvirt-python-4.5.0-1.el7.x86_64
python-netaddr-0.7.5-9.el7.noarch
python-ethtool-0.8-7.el7.x86_64
gnome-python2-2.28.1-14.el7.x86_64
python-lxml-3.2.1-4.el7.x86_64
python-kitchen-1.1.1-5.el7.noarch
python2-blockdev-2.18-3.el7.x86_64
python-decorator-3.4.0-3.el7.noarch
python-ldap-2.4.15-2.el7.x86_64
python-idna-2.4-1.el7.noarch
python-urllib3-1.10.2-5.el7.noarch
python-meh-gui-0.25.2-1.el7.noarch
python-firewall-0.5.3-5.el7.noarch
python-deltarpm-3.6-3.el7.x86_64
python-kmod-0.9-4.el7.x86_64
python-setproctitle-1.1.6-5.el7.x86_64
python2-requests-oauthlib-0.8.0-5.el7.noarch
python3-3.6.8-10.el7.x86_64
python-pillow-2.0.0-19.gitd1c6db8.el7.x86_64
abrt-python-2.1.11-52.el7.centos.x86_64
python-sssdconfig-1.16.2-13.el7.noarch
python-urlgrabber-3.10-9.el7.noarch
dbus-python-1.1.1-9.el7.x86_64
python-brlapi-0.6.0-16.el7.x86_64
python-qrcode-core-5.0.1-1.el7.noarch
python-configshell-1.1.fb23-5.el7.noarch
python2-cryptography-1.7.2-2.el7.x86_64
python-rtslib-2.1.fb63-13.el7.noarch
python-custodia-0.3.1-4.el7.noarch
python-netifaces-0.10.4-3.el7.x86_64
python-pyblock-0.53-6.el7.x86_64
python2-pyatspi-2.26.0-3.el7.noarch
python2-pyasn1-0.1.9-7.el7.noarch
python-cffi-1.6.0-5.el7.x86_64
python-pwquality-1.2.3-5.el7.x86_64
python2-pip-8.1.2-10.el7.noarch
python-ipaddress-1.0.16-2.el7.noarch
python-kdcproxy-0.3.2-1.el7.noarch
python-javapackages-3.4.1-11.el7.noarch
python-slip-0.4.0-4.el7.noarch
python2-subprocess32-3.2.6-13.el7.x86_64
python-chardet-2.2.1-1.el7_1.noarch
python-suds-0.4.1-5.el7.noarch
python2-futures-3.1.1-5.el7.noarch
python-ntplib-0.3.2-1.el7.noarch
python-pyudev-0.15-9.el7.noarch
python2-oauthlib-2.0.1-8.el7.noarch
libstoragemgmt-python-clibs-1.6.2-4.el7.x86_64
python-adal-0.4.7-1.el7.noarch
cryptsetup-python-2.0.3-3.el7.x86_64
python-slip-dbus-0.4.0-4.el7.noarch
policycoreutils-python-2.5-29.el7.x86_64
libuser-python-0.60-9.el7.x86_64
python-srpm-macros-3-32.el7.noarch
python-s3transfer-0.1.13-1.el7.noarch
python-nss-0.16.0-3.el7.x86_64
python2-ipaserver-4.6.4-10.el7.centos.noarch
python2-pyasn1-modules-0.1.9-7.el7.noarch
python-sss-murmur-1.16.2-13.el7.x86_64
audit-libs-python-2.8.4-4.el7.x86_64
python-ipaddr-2.1.11-1.el7.noarch
openlmi-python-base-0.5.0-4.el7.noarch
python-msrest-0.4.18-1.el7.noarch
openlmi-python-providers-0.5.0-4.el7.noarch
speech-dispatcher-python-0.7.1-15.el7.x86_64
libselinux-python-2.5-14.1.el7.x86_64
liblouis-python-2.5.2-12.el7_4.noarch
lvm2-python-libs-2.02.180-8.el7.x86_64
python3-setuptools-39.2.0-10.el7.noarch
python-libs-2.7.5-86.el7.x86_64
python-gssapi-1.2.0-3.el7.x86_64
python-inotify-0.9.4-4.el7.noarch
python-IPy-0.75-6.el7.noarch
python-perf-3.10.0-957.el7.x86_64
python-configobj-4.7.2-7.el7.noarch
python-backports-1.0-8.el7.x86_64
python-coverage-3.6-0.5.b3.el7.x86_64
python-azure-sdk-2.0.0-3.el7.noarch
python-blivet-0.61.15.72-1.el7.noarch
python-gobject-base-3.22.0-1.el7_4.1.x86_64
python-libipa_hbac-1.16.2-13.el7.x86_64
python-yubico-1.2.3-1.el7.noarch
python-devel-2.7.5-86.el7.x86_64
python-dns-1.12.0-4.20150617git465785f.el7.noarch
python-augeas-0.5.0-2.el7.noarch
rpm-python-4.11.3-35.el7.x86_64
python-linux-procfs-0.4.9-4.el7.noarch
python-jwt-1.5.3-1.el7.noarch
python3-pip-9.0.3-5.el7.noarch
python-enum34-1.0.4-1.el7.noarch
abrt-addon-python-2.1.11-52.el7.centos.x86_64
python-cups-1.9.63-6.el7.x86_64
systemd-python-219-62.el7.x86_64
langtable-python-0.0.31-3.el7.noarch
python-urwid-1.1.1-3.el7.x86_64
python-requests-2.6.0-1.el7_1.noarch
python-meh-0.25.2-1.el7.noarch
python-six-1.9.0-2.el7.noarch
libpeas-loader-python-1.22.0-1.el7.x86_64
openwsman-python-2.6.3-4.git4391e5c.el7.x86_64
python3-libs-3.6.8-10.el7.x86_64
python-smbc-1.0.13-8.el7.x86_64
libreport-python-2.1.11-42.el7.centos.x86_64
python-isodate-0.5.4-8.el7.noarch
python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch
python-iniparse-0.4-9.el7.noarch
gnome-python2-canvas-2.28.1-14.el7.x86_64
python-rpm-macros-3-32.el7.noarch
python-boto3-1.4.6-5.el7.noarch
python-dateutil-1.5-7.el7.noarch
python2-ipaclient-4.6.4-10.el7.centos.noarch
python-pycurl-7.19.0-19.el7.x86_64
python-clufter-0.77.1-1.el7.noarch
python-ply-3.4-11.el7.noarch
python-di-0.3-2.el7.noarch
python-jwcrypto-0.4.2-1.el7.noarch
libstoragemgmt-python-1.6.2-4.el7.noarch
libxml2-python-2.9.1-6.el7_2.3.x86_64
python-pycparser-2.14-1.el7.noarch
python-2.7.5-86.el7.x86_64
[root@srvr0 ~]# rpm -qa | grep ruby
ruby-2.0.0.648-33.el7_4.x86_64
rubygem-io-console-0.4.2-33.el7_4.x86_64
rubygem-psych-2.0.0-33.el7_4.x86_64
ruby-libs-2.0.0.648-33.el7_4.x86_64
ruby-irb-2.0.0.648-33.el7_4.noarch
rubygem-rdoc-4.0.0-33.el7_4.noarch
rubygem-bigdecimal-1.2.0-33.el7_4.x86_64
rubygems-2.0.14.1-33.el7_4.noarch
rubygem-abrt-0.3.0-1.el7.noarch
rubygem-json-1.7.7-33.el7_4.x86_64
[root@srvr0 ~]# rpm -qa | grep perl-Digest
perl-Digest-MD5-2.52-3.el7.x86_64
perl-Digest-SHA-5.85-4.el7.x86_64
perl-Digest-1.17-245.el7.noarch
perl-Digest-HMAC-1.03-5.el7.noarch
[root@srvr0 ~]# rpm -qa | grep epel-release
epel-release-7-11.noarch
[root@srvr0 ~]# rpm -qa | grep ccache
ccache-3.3.4-1.el7.x86_64
[root@srvr0 ~]# rpm -qa | grep git
libglvnd-glx-1.0.1-0.8.git5baa1e5.el7.x86_64
libglvnd-gles-1.0.1-0.8.git5baa1e5.el7.x86_64
lm_sensors-libs-3.4.0-6.20160601gitf9185e5.el7.x86_64
hypervvssd-0-0.34.20180415git.el7.x86_64
ipxe-roms-qemu-20170123-1.git4e85b27.el7_4.1.noarch
libwsman1-2.6.3-4.git4391e5c.el7.x86_64
python-pillow-2.0.0-19.gitd1c6db8.el7.x86_64
hypervfcopyd-0-0.34.20180415git.el7.x86_64
openwsman-client-2.6.3-4.git4391e5c.el7.x86_64
crontabs-1.11-6.20121102git.el7.noarch
squashfs-tools-4.3-0.21.gitaae0aff4.el7.x86_64
lldpad-1.0.1-3.git036e314.el7.x86_64
xdg-utils-1.1.0-0.17.20120809git.el7.noarch
LibRaw-0.14.8-5.el7.20120830git98d925.x86_64
libglvnd-egl-1.0.1-0.8.git5baa1e5.el7.x86_64
git-1.8.3.1-19.el7.x86_64
numad-0.5-18.20150602git.el7.x86_64
linux-firmware-20180911-69.git85c5d90.el7.noarch
python-dns-1.12.0-4.20150617git465785f.el7.noarch
taglib-1.8-7.20130218git.el7.x86_64
jboss-annotations-1.1-api-1.0.1-0.6.20120212git76e1a2.el7.noarch
lockdev-1.0.4-0.13.20111007git.el7.x86_64
polkit-kde-0.99.1-4.20130311git.el7.x86_64
libglvnd-1.0.1-0.8.git5baa1e5.el7.x86_64
net-tools-2.0-0.24.20131004git.el7.x86_64
hyperv-daemons-0-0.34.20180415git.el7.x86_64
openwsman-python-2.6.3-4.git4391e5c.el7.x86_64
hyperv-daemons-license-0-0.34.20180415git.el7.noarch
hypervkvpd-0-0.34.20180415git.el7.x86_64
[root@srvr0 ~]# rpm -qa | grep python2-pip
python2-pip-8.1.2-10.el7.noarch
[root@srvr0 ~]# rpm -qa | grep cmake
cmake3-data-3.14.6-2.el7.noarch
cmake3-3.14.6-2.el7.x86_64
[root@srvr0 ~]# rpm -qa | grep ctest
[root@srvr0 ~]# 

安装日志:

    [root@srvr0 yugabyte-db]# /opt/yugabyte/yugabyte-db/yb_build.sh
...
    Verifying Linuxbrew archive checksum ...
    linuxbrew-20191015T202549.tar.gz: OK
    Installing Linuxbrew into /root/.linuxbrew-yb-build/linuxbrew-20191015T202549...
    fatal: Not a git repository (or any of the parent directories): .git
    Submodule 'submodules/yugabyte-bash-common' (https://github.com/yugabyte/yugabyte-bash-common.git) registered for path 'submodules/yugabyte-bash-common'
    Submodule 'submodules/yugabyte-installation' (https://github.com/yugabyte/yugabyte-installation.git) registered for path 'submodules/yugabyte-installation'
    [2019-11-30T20:49:36 common-build-env.sh:464 set_cmake_build_type_and_compiler_type] Setting build type to 'debug' by default
    [2019-11-30T20:49:36 yb_build.sh:983 main] YugaByte build is running on host 'srvr0'
    [2019-11-30T20:49:36 yb_build.sh:984 main] YB_COMPILER_TYPE=gcc
    Using third-party directory (YB_THIRDPARTY_DIR): /opt/yugabyte/yugabyte-db/thirdparty
    [2019-11-30T20:49:39 yb_build.sh:1210 main] Using make parallelism of 4 (YB_REMOTE_COMPILATION=0)
    [2019-11-30T20:49:39 yb_build.sh:353 run_cxx_build] Using cmake binary: /usr/local/bin/cmake
    [2019-11-30T20:49:39 yb_build.sh:354 run_cxx_build] Running cmake in /opt/yugabyte/yugabyte-db/build/debug-gcc-dynamic-ninja
    + export YB_REMOTE_COMPILATION=0
    + YB_REMOTE_COMPILATION=0
    + cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_C_COMPILER=/opt/yugabyte/yugabyte-db/build-support/compiler-wrappers/cc -DCMAKE_CXX_COMPILER=/opt/yugabyte/yugabyte-db/build-support/compiler-wrappers/c++ -G Ninja -DCMAKE_MAKE_PROGRAM=/root/.linuxbrew-yb-build/linuxbrew-20191015T202549/bin/ninja /opt/yugabyte/yugabyte-db
    CMake Error at CMakeLists.txt:38 (project):
      Running

       '/root/.linuxbrew-yb-build/linuxbrew-20191015T202549/bin/ninja' '--version'

      failed with:

       Illegal instruction


    -- Configuring incomplete, errors occurred!
    See also "/opt/yugabyte/yugabyte-db/build/debug-gcc-dynamic-ninja/CMakeFiles/CMakeOutput.log".

    ==========================================================================================
    YUGABYTE BUILD SUMMARY
    ==========================================================================================
    Build type                       : debug
    C/C++ compiler                   : gcc
    Build directory                  : /opt/yugabyte/yugabyte-db/build/debug-gcc-dynamic-ninja
    Third-party dir                  : /opt/yugabyte/yugabyte-db/thirdparty
    Linuxbrew dir                    : /root/.linuxbrew-yb-build/linuxbrew-20191015T202549
    Exit code                        : 1
    ------------------------------------------------------------------------------------------

CMakeOutput.log:

[root@srvr0 ~]# cat /opt/yugabyte/yugabyte-db/build/debug-gcc-dynamic-ninja/CMakeFiles/CMakeOutput.log
The system is: Linux - 3.10.0-957.el7.x86_64 - x86_64

无效的操作码:

[root@srvr0 ~]# grep "invalid opcode" /var/log/messages
Nov 30 20:49:39 srvr0 kernel: traps: ninja[5039] trap invalid opcode ip:7f28d65eab8a sp:7ffe5291f890 error:0 in ld-2.23.so[7f28d65e2000+1b000]

请指导我从源代码编译和安装yugabyte。

1 个答案:

答案 0 :(得分:0)

此问题(ld-2.23.so中无效的操作码ip:7f28d65eab8a sp:7ffe5291f890错误:0)已通过提交https://github.com/yugabyte/yugabyte-db/issues/3044来解决。

使用较新的linuxbrew软件包的YugabyteDB的某些版本受此问题影响。 YugabyteDB 2.0.8版解决了此问题。