Errors when installing on RHEL 7.2

I see this same issue when installing either the community or the enterprise edition of the server package on a RedHat 7.2 VM…

It seems that the scripts used to install one of the tools dependencies is trying to install the el6 version of py-bcrypt instead of the el7 version.

Here’s what it looks like when I do an ‘asinstall’:

[root@mybox aerospike-server-community-3.9.1.1-el7]# ./asinstall
Installing tools dependencies
Installing py-bcrypt-0.3-1.el6.x86_64.rpm
warning: /stage/aerospike-server-community-3.9.1.1-el7/aerospike-tools-deps/python-bcrypt/py-bcrypt-0.3-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
error: Failed dependencies:
	libpython2.6.so.1.0()(64bit) is needed by py-bcrypt-0.3-1.el6.x86_64
	python(abi) = 2.6 is needed by py-bcrypt-0.3-1.el6.x86_64
Installing tools
rpm -Uvh aerospike-tools-3.9.1.2-1.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Installing /opt/aerospike
Updating / installing...
   1:aerospike-tools-3.9.1.2-1.el7    ################################# [100%]
Writing /usr/lib64/python2.7/site-packages/aerospike.pth
Adding python path /opt/aerospike/lib/python
Installing server
rpm -Uvh aerospike-server-community-3.9.1.1-1.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:aerospike-server-community-3.9.1.################################# [100%]

Why even include el6 dependencies in an el7 rpm bundle?

It looks like the aerospike-server-community-3.9.1.1-el7/aerospike-tools-deps/python-bcrypt/install.sh is looking at the /etc/os-release file to try and decide what package to install, so the logic error lives here. For reference, here’s my os-release file which I think is pretty standard on RHEL 7.2.

[root@mybox aerospike-server-community-3.9.1.1-el7]# more /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.2 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.2"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.2 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.2:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.2
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.2"

Yes, look like a bug. The script is trying to match 7 but failed because VERSION_ID is 7.2.

As a workaround, you can try “yum install py-bcrypt” using the epel repo.

Hi Tony,

Is this going to be addressed in an upcoming patch? I’d fix it myself and submit it back to the github site, but I don’t think these install.sh scripts are in any published git repo.

Thanks

Unsure about the first question, but I can address the second: https://github.com/aerospike/aerospike-server/blob/master/pkg/rpm/asinstall

Hi Kevin,

The asinstall script that you linked to in github looks to be outdated. It doesn’t match what was in the aerospike-server-community-3.9.1.1-el7 release, as it is strictly EL6 specific in github. How long has it been since the Aerospike team has pushed here with updates?

Current packages include an asinstall file with an if block that installs these tool dependencies:

<snip>
################################################################################
# Install tools dependencies

if [ -f aerospike-tools-deps/install.sh ]; then
	echo Installing tools dependencies
	aerospike-tools-deps/install.sh
fi

<snip>

It’s within the install.sh, well actually the scripts that install.sh calls, that the issue resides. None of these files are in the public github yet.

Thanks, James

It should be fixed now. Please try 3.10.0.3 again.

Hi Tony, The fix in 3.10.0.3 does not work, though it is closer :slight_smile: It also didn’t get ported to 3.10.1…

The version number matching is fixed, but the matching on the distro id is not.

Changing this block in aerospike-server-community-3.10.0.3-el7/aerospike-tools-deps/python-bcrypt/install.sh will fix the issue.

before

case "$distro_id" in
        *'centos'* | *'redhat'* )
                distro_id='el'
        ;;
esac

after

case "$distro_id" in
        *'centos'* | *'redhat'* | *'rhel'* )
                distro_id='el'
        ;;
esac

Hi James,

Thank you for the feedback! Please download 3.10.1.1 and try again. It has your suggested fix.

Best regards, Tony