Skip to content

Instantly share code, notes, and snippets.

@dogukancagatay
Last active June 15, 2021 13:52
Show Gist options
  • Save dogukancagatay/69ad354303d3ee727cce80add816e1fb to your computer and use it in GitHub Desktop.
Save dogukancagatay/69ad354303d3ee727cce80add816e1fb to your computer and use it in GitHub Desktop.
XCA build and install on CentOS 7

Install XCA on Centos 7

Install Dependencies

yum install -y git
yum groupinstall -y "Development Tools"
yum install -y qt5-qtbase-devel qt5-qttools-devel qt5-qtbase-mysql qt5-qtbase-postgresql qt5-linguist
yum install -y openssl-devel libtool-ltdl-devel 

Modify Environment Variables

export CXXFLAGS=-std=c++11
export PATH="/usr/lib64/qt5/bin/:$PATH"

Clone, Build and Install

git clone https://github.com/chris2511/xca.git
cd xca
./bootstrap
make
make install
@SalehAlolayan
Copy link

For any one coming for CentOS 8 it work too, thanks for your efforts.

@scylla999
Copy link

I get compilation errors on CentOS 8. I set the environment variables and installed the packages mentioned above...

@Sisko42
Copy link

Sisko42 commented Jun 14, 2021

I followed the instructions above, but unfortunately i get errors on CentOS 7 (fresh install):

pki_key.cpp:641:36: error: missing binary operator before token "("
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
^
moc_db_crl.cpp:13:2: error: #error "The header file 'db_crl.h' doesn't include ."
#error "The header file 'db_crl.h' doesn't include ."
^
......
......
base.h:18:21: fatal error : qglobal.h: file or directory not found
#include <qglobal.h>
^

Maybe there is something missing?

@scylla999
Copy link

I get the same error on CentOS 8

@scylla999
Copy link

I got an answer on the devs github:

install qt5-qttools-devel

Everything works great now.

@Sisko42
Copy link

Sisko42 commented Jun 15, 2021

@scylla999
Thank you - that helped for this kind of errors!
But there is another problem with CentOS 7 and the actual release of xca-2.4.0:
OpenSSL 1.1.x is needed, but CentOS 7 has only version 1.0.2k in its default install.
You get the following error message:

pki_x509.cpp: In member function 'virtual extList pki_x509::getV3ext() const':
pki_x509.cpp:778:39: error: 'X509_get0_extensions' was not declared in this scope
el.setStack(X509_get0_extensions(cert));

So you can either update OpenSSL from the sources or download xca-2.3.0 and compile it.
I have chosen the latter and everything works fine!

@scylla999
Copy link

I'm moving all my servers to either RHEL8 or CentOS8-Stream this summer. I've had enough of fighting with old libraries on CentOS7.

@dogukancagatay
Copy link
Author

@Sisko42

I think epel-release for CentOS 7 has OpenSSL 1.1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment