letsencrypt-auto certonly does'nt work - centos

no matter which command I use with ./letsencypt-auto the result is always the same as blew, am I missing something here.
here is an output on ./letsencrypt-auto certonly.
[root#tipsycore letsencrypt]# ./letsencrypt-auto certonly
#Bootstrapping dependencies for RedHat-based OSes...
#yum is /usr/bin/yum
#Loaded plugins: fastestmirror, refresh-packagekit, security
#Setting up Install Process
#Loading mirror speeds from cached hostfile
# * base: mirror.zetup.net
# * epel: ftp.lysator.liu.se
# * extras: mirror.zetup.net
# * updates: mirror.zetup.net
#Package python-2.6.6-64.el6.x86_64 already installed and latest version
#Package python-devel-2.6.6-64.el6.x86_64 already installed and latest #version
#Package python-virtualenv-1.10.1-1.el6.noarch already installed and latest #version
#Nothing to do
#Loaded plugins: fastestmirror, refresh-packagekit, security
#Setting up Install Process
#Loading mirror speeds from cached hostfile
# * base: mirror.zetup.net
# * epel: ftp.lysator.liu.se
# * extras: mirror.zetup.net
# * updates: mirror.zetup.net
#Package gcc-4.4.7-16.el6.x86_64 already installed and latest version
#Package dialog-1.1-9.20080819.1.el6.x86_64 already installed and latest #version
#Package augeas-libs-1.0.0-10.el6.x86_64 already installed and latest version
#Package openssl-devel-1.0.1e-42.el6_7.2.x86_64 already installed and latest #version
#Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest #version
#Package redhat-rpm-config-9.0.3-44.el6.centos.noarch already installed and #latest version
#Package ca-certificates-2015.2.4-65.0.1.el6_6.noarch already installed and #latest version
#Nothing to do
#Loaded plugins: fastestmirror, refresh-packagekit, security
#Setting up Install Process
#Loading mirror speeds from cached hostfile
# * base: mirror.zetup.net
# * epel: ftp.lysator.liu.se
# * extras: mirror.zetup.net
# * updates: mirror.zetup.net
#Package 2:mod_ssl-2.2.15-47.el6.vm.x86_64 already installed and latest #version
#Nothing to do
#WARNING: Python 2.6 support is very experimental at present...
#if you would like to work on improving it, please ensure you have backups
#and then run this script again with the --debug flag!
#[root#tipsycore letsencrypt]#

Try this:
Lets encrypt Centos 6
# yum install centos-release-SCL
# yum install python27 python27-python-devel python27-python-setuptools python27-python-tools python27-python-virtualenv
# ln -s /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64/libpython2.7.so.1.0
# ln -s /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64/libpython2.7.so
# ll /usr/lib64/libpyt*
lrwxrwxrwx. 1 root root 19 Aug 22 2016 /usr/lib64/libpython2.6.so -> libpython2.6.so.1.0
-r-xr-xr-x. 1 root root 1669840 Aug 18 2016 /usr/lib64/libpython2.6.so.1.0
lrwxrwxrwx 1 root root 51 Mar 1 17:59 /usr/lib64/libpython2.7.so -> /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0
lrwxrwxrwx 1 root root 51 Mar 1 17:59 /usr/lib64/libpython2.7.so.1.0 -> /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0
# /opt/rh/python27/root/usr/bin/python2.7 -V
Python 2.7.8
# vim ~/.bash_profile
PATH=/opt/rh/python27/root/usr/bin/:$PATH:$HOME/bin
export PATH
# python -V
Python 2.6.6
# source ~/.bash_profile
# python -V
Python 2.7.8
# git clone https://github.com/letsencrypt/letsencrypt
# cd /opt/letsencrypt/
# service nginx stop
# ./letsencrypt-auto certonly --standalone -d <YOUR_DOMAIN.COM>

The problem is (somewhat confusingly) described by the last message you get in the output from letsencrypt-auto:
#WARNING: Python 2.6 support is very experimental at present...
#if you would like to work on improving it, please ensure you have backups
#and then run this script again with the --debug flag!
The LetsEncrypt client you are running requires Python 2.7 or above. You have Python 2.6 installed. I have a blog post describing the way I solved this problem: https://thelastcicada.com/solving-the-python-2-6-issue-for-letencrypt-on-centos-6. Below I will go into further detail and summarize my solution.
I'm going to assume from this issue and the output of your letsencrypt-auto that you are running CentOS 6 or a similar RHEL6-based operating system. This is important because systems tools on CentOS 6 are all based on Python 2.6 (yum in particular is) and your system can therefore not upgrade safely past Python 2.6. CentOS 7 doesn't have this problem and comes packaged with a newer version of Python.
To solve this on CentOS 6, you could run letsencrypt-auto --debug, as noted in the error message, but that just allows you to run the experimental Python 2.6 code that isn't yet well supported. Alternatively, you can use Software Collections to install Python 2.7 on CentOS 6 in it's own environment that can run alongside Python 2.6 and not mess up your system's default Python installation.
The basic steps are:
yum install centos-release-SCL to install the Software Collections package
yum install python27 to install Python 2.7
scl enable python27 "/root/letsencrypt/letsencrypt-auto certonly --agree-tos --webroot --webroot-path /var/www/html/mywebsite.com -d mywebsite.com" to run the LetsEncrypt client using the Python 2.7 version via Software Collections. The flags passed to letsencrypt-auto are typical ones I use when requesting an SSL certificate to install with Nginx - your configuration my vary.
Hope this helps and good luck!

Related

Rpmbuild asks for extra dependencies

I am trying to build an RPM on Centos 7. I am making a wildfly application into RPM using below SPEC file.
Name: wildfly
Version: 16.0.0.Final
Release: 1%{?dist}
Summary: WildFly Application Server
Group: System Environment/Daemons
License: LGPL 2.1
Source0: %{name}-%{version}.tar.gz
Requires(pre): shadow-utils
Requires: java >= 1.7.0
#Requires: /etc/init.d/functions
Provides: wildfly
%undefine _missing_build_ids_terminate_build
%define __arch_install_post QA_SKIP_RPATHS=2 %{__arch_install_post}
%define __jar_repack 0
%description
WildFly Application Server packaged from the binary distribution.
%prep
%setup -q -n wildfly-%{version}
%install
mkdir -p %{buildroot}/opt/wildfly
cp -R . %{buildroot}/opt/wildfly
mkdir -p %{buildroot}/var/log/wildfly
mkdir -p %{buildroot}/var/run/wildfly
#%post
#alternatives --install /etc/alternatives/wildfly wildfly /opt/wildfly 100
#%postun
#alternatives --remove wildfly /opt/wildfly
%files
%defattr(-,root,root,0755)
%files
%defattr(-,root,root,0755)
%dir /opt/wildfly
/opt/wildfly/appclient
/opt/wildfly/bin
/opt/wildfly/domain
/opt/wildfly/jboss-modules.jar
/opt/wildfly/modules
%attr(-,wildfly,wildfly) /opt/wildfly/standalone
/opt/wildfly/welcome-content
%dir /var/log/wildfly
%dir /var/run/wildfly
%doc /opt/wildfly/copyright.txt
%doc /opt/wildfly/LICENSE.txt
%doc /opt/wildfly/README.txt
%doc /opt/wildfly/docs
%changelog
* Wed Nov 24 2021
- First version being packaged
On building, i noticed that it is taking certain dependencies which i didn't defined in SPEC file.
Requires: /bin/bash /bin/sh libaio.so.1 libaio.so.1()(64bit) libaio.so.1(LIBAIO_0.1) libaio.so.1(LIBAIO_0.1)(64bit) libaio.so.1(LIBAIO_0.4) libaio.so.1(LIBAIO_0.4)(64bit) libc.so.1()(64bit) libc.so.1(SUNW_0.7)(64bit) libc.so.1(SUNW_0.9)(64bit) libc.so.6 libc.so.6()(64bit) libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.10) libc.so.6(GLIBC_2.10)(64bit) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.2.5)(64bit) libdl.so.1()(64bit) libdl.so.1(SUNW_0.7)(64bit) libdl.so.2 libdl.so.2()(64bit) libdl.so.2(GLIBC_2.0) libdl.so.2(GLIBC_2.1) libdl.so.2(GLIBC_2.2.5)(64bit) libgcc_s.so.1()(64bit) rtld(GNU_HASH)
So when I try to install this RPM on Centos 7 machine, it throws the following error.
sudo rpm -ivh wildfly-16.0.0.Final-1.el7.x86_64.rpm
error: Failed dependencies:
libaio.so.1 is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1()(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.1) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.4) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.1()(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.1(SUNW_0.7)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.1(SUNW_0.9)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6 is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.0) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.1.3) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.10) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.2) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.1()(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.1(SUNW_0.7)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.2 is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.2(GLIBC_2.0) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.2(GLIBC_2.1) is needed by wildfly-16.0.0.Final-1.el7.x86_64
How can I solve the above dependencies issue. I already installed
sudo yum install libaio -y
Still dependencies issues are coming. Please help.
You need to package libaio.so.1 in your RPM as well, and fix the RPATHs to find it. Don't use QA_SKIP_RPATHS unless you know what you're doing - they're there for a reason!
The libc and libdl problems imply you're not using the system compilers and have your own toolchain installed; that's going to be another problem. Is there a reason you can't use the stock gcc?
Further examination makes it look like you're trying to make a "fancy tarball" RPM and not doing the actual compilation with rpmbuild, which can lead to more problems - where did the binaries come from? Another CentOS box, or a different distribution? The SUNW tag in particular worries me.

yum fails to update

yum fails to update CentOs 7.6.
it says Requires: qt5-qtbase(x86-64) = 5.9.2 but on the other side it says Removing: qt5-qtbase-5.9.2-3.el7.x86_64 !!
How can I fix this?
thank you
--> Processing Dependency: qt5-qtbase(x86-64) = 5.9.2 for package: qt5-qtstyleplugins-5.0.0-26.el7.x86_64
--> Processing Dependency: qt5-qtbase(x86-64) = 5.9.2 for package: qt5-qtquick1-5.7.1-1.2bc722agit.el7.x86_64
--> Finished Dependency Resolution
Error: Package: qt5-qtstyleplugins-5.0.0-26.el7.x86_64 (#epel)
Requires: qt5-qtbase(x86-64) = 5.9.2
Removing: qt5-qtbase-5.9.2-3.el7.x86_64 (#anaconda)
qt5-qtbase(x86-64) = 5.9.2-3.el7
Updated By: qt5-qtbase-5.9.7-2.el7.x86_64 (base)
qt5-qtbase(x86-64) = 5.9.7-2.el7
Error: Package: qt5-qtquick1-5.7.1-1.2bc722agit.el7.x86_64 (#epel)
Requires: qt5-qtbase(x86-64) = 5.9.2
Removing: qt5-qtbase-5.9.2-3.el7.x86_64 (#anaconda)
qt5-qtbase(x86-64) = 5.9.2-3.el7
Updated By: qt5-qtbase-5.9.7-2.el7.x86_64 (base)
qt5-qtbase(x86-64) = 5.9.7-2.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
update :
enabled repos:
[mehrdad#MHRS ~]$ yum repolist enabled
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.alpix.eu
* centos-sclo-rh: ftp.uni-bayreuth.de
* centos-sclo-sclo: ftp.uni-bayreuth.de
* epel: mirror.redium.net
* extras: centos.mirror.iphh.net
* nux-dextop: mirror.li.nux.ro
* rpmfusion-free-updates: mirror.ehv.weppel.nl
* rpmfusion-nonfree-updates: mirror.ehv.weppel.nl
* updates: ftp.agdsn.de
repo id repo name status
!base/7/x86_64 CentOS-7 - Base 10,097
!centos-sclo-rh/x86_64 CentOS-7 - SCLo rh 8,548
!centos-sclo-sclo/x86_64 CentOS-7 - SCLo sclo 804
!epel/x86_64 Extra Packages for Enterprise Linux 7 - 13,413
!extras/7/x86_64 CentOS-7 - Extras 304
!google-chrome google-chrome 3
!nodesource/x86_64 Node.js Packages for Enterprise Linux 7 43
!nux-dextop/x86_64 Nux.Ro RPMs for general desktop use 2,718
!rpmfusion-free-updates/x86_64 RPM Fusion for EL 7 - Free - Updates 248
!rpmfusion-nonfree-updates/x86_64 RPM Fusion for EL 7 - Nonfree - Updates 77
!sublime-text Sublime Text - x86_64 - Stable 2
!updates/7/x86_64 CentOS-7 - Updates 319
repolist: 36,576
There does not seem to be a real solution for this. qt5-qtstyleplugins from the epel repository requires qt5-qtbase with the exact version 5.9.2, however this version is not available anymore in the base repository.
If you want your yum update to succeed, you can exclude these packages from updates:
yum update --exclude=qt5-qt*
see here for more information on excluding packages from yum updates.

Segfault on mongodb extension 1.1.2/1.1.3-dev with PHP 7 FPM under gentoo

I am heaving a strange problem under gentoo. Mongodb extension is working fine in apache2 and cli, but fpm fails to start:
/etc/init.d/php-fpm restart
* Testing PHP FastCGI Process Manager configuration ...
[30-Jan-2016 13:59:47] NOTICE: configuration file /etc/php/fpm-php7.0/php-fpm.conf test is successful
zend_mm_heap corrupted [ !! ]
php -v
PHP 7.0.2-pl5-gentoo (cli) (built: Jan 30 2016 13:16:21) ( ZTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Here is the info from cli:
php -i|grep mongo
mongodb
mongodb support => enabled
mongodb version => 1.1.3-dev
mongodb stability => devel
libmongoc version => 1.3.1-dev
mongodb.debug => no value => no value
I even compiled mongodb without sasl but the result is the same.
Mongodb extension was manually compiled like this(my system is x86_64):
git clone https://github.com/mongodb/mongo-php-driver.git
cd mongo-php-driver; git submodule sync && git submodule update --init
Run phpize:
phpize --clean
phpize
Remove the aclocal.m4 file:
rm aclocal.m4
Run aclocal and autoconf:
aclocal
autoconf
Now configure, make and install the package:
./configure --without-mongodb_sasl (i tried with and without this)
make
make install
add extension=mongodb.so in php.ini: /etc/php/fpm-php7.0/php.ini
restart php-fpm: /etc/init.d/php-fpm restart
The strangest thing is that if i start php-fpm process with gdb to backtrace the extensions works.
gdb -q /usr/lib/php7.0/bin/php-fpm
Reading symbols from /usr/lib/php7.0/bin/php-fpm...(no debugging symbols found)...done.
(gdb) set args --pid /run/php-fpm.pid --fpm-config /etc/php/fpm-php7.0/php-fpm.conf -c /etc/php/fpm-php7.0/
(gdb) run
Starting program: /usr/lib64/php7.0/bin/php-fpm --pid /run/php-fpm.pid --fpm-config /etc/php/fpm-php7.0/php-fpm.conf -c /etc/php/fpm-php7.0/
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Inferior 1 (process 4075) exited normally]
(gdb)
Any help is apreciated
For the sake of the lazy googler, this is fixed in version 1.1.5 of the php-mongodb-driver

Chef install of readline package fails on Ubuntu 14.04

I am trying get PostgreSQL (server) installed on an Ubuntu node using Chef:
Role definition (roles/base_server.rb):
run_list(
"recipe[apt]",
"recipe[postgres::server]"
)
default_attributes(
postgresql: {
version: "9.3.4",
config: {
shared_buffers_mb: "12000"
}
}
Setup
System: Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)
Chef-Version: 11.14.6
Postgres Cookbook: [3.4.1] (https://github.com/hw-cookbooks/postgresql)
Running the bootstrap command
knife bootstrap IPADDRESS -x USER -r 'role[base_server]' --sudo
Results in the following error:
* package[readline] action install
* No version specified, and no candidate version available for readline
================================================================================
Error executing action `install` on resource 'package[readline]'
================================================================================
Chef::Exceptions::Package
-------------------------
No version specified, and no candidate version available for readline
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/postgres/recipes/build.rb
29: package package_name do
30: action :install
31: end
32: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/postgres/recipes/build.rb:29:in `block in from_file'
package("readline") do
action [:install]
retries 0
retry_delay 2
guard_interpreter :default
package_name "readline"
timeout 900
cookbook_name "postgres"
recipe_name "build"
end
I already tried to fix this by installing the readline libraries manually, but no success. Has anyone an idea how to solve this?
As mentioned by StephenKing, the issue isn't with Chef, it is that the package really doesn't exist. You'll need to fix your recipe code to use the correct package name.

Trying to install meteor on centos 5

OS: Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Trying to run this command to install meteor:
curl install.meteor.com | /bin/sh
============= Output Error ===============
Installing /tmp/meteor-install-Nv47529/meteor-0.3.6-1.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.6)(64bit) is needed by meteor-0.3.6-1.x86_64
libc.so.6(GLIBC_2.7)(64bit) is needed by meteor-0.3.6-1.x86_64
libc.so.6(GLIBC_2.9)(64bit) is needed by meteor-0.3.6-1.x86_64
libstdc++.so.6(GLIBCXX_3.4.9)(64bit) is needed by meteor-0.3.6-1.x86_64
Installation failed.
============= Output Error ===============
glib is missing showing but check glib using
rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}\n" | grep glibc | sort
showing me
compat-glibc-2.3.4-2.26.i386
compat-glibc-2.3.4-2.26.x86_64
compat-glibc-headers-2.3.4-2.26.x86_64
glibc-2.5-49.el5_5.7.i686
glibc-2.5-49.el5_5.7.x86_64
glibc-common-2.5-49.el5_5.7.x86_64
glibc-devel-2.5-49.el5_5.7.i386
glibc-devel-2.5-49.el5_5.7.x86_64
glibc-headers-2.5-49.el5_5.7.x86_64
glibc-utils-2.5-49.el5_5.7.x86_64
so any idea what is the issue?
GLIBC_2.6 is required by the RPM, you only have GLIBC_2.5 so you need to upgrade.
Alternatively, this dependency may be more strict than it needs to be; try packing Meteor yourself.