Monday, February 26, 2018

Error: Package: php-gd-5.4.45-13.el6.remi.x86_64 (remi)

Error : Package: php-gd-5.4.45-13.el6.remi.x86_64 (remi)

The error happen after I upgraded PHP from 5.3 to 5.6. Then when i tried to install php-gd I am seeing this error.

Solution:

yum --enablerepo=remi,remi-php56 install php-gd

The above end up in another error:

Error: Package: gd-last-2.2.5-1.el6.remi.x86_64 (remi)
Request: libwebp.so.5 () (64bit)



Solution:

It seems that you are requesting libwebp, so just install libwebp from epel

If you have not installed epel yet,


yum install epel-release -y
yum update

Install libwebp


yum install libwebp --enablerepo=epel -y

Install php-gd


yum install php-gd  --enableablepo=remi 

It will works!


 

How to Upgrade PHP 5.3 to PHP 5.6 on CentOS

Here we are upgrading PHP 5.3 to PHP 5.6 on CentOS.

 1. Confirm the current version: php -v

PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


 2. Install the Remi and EPEL RPM repositories

If you haven’t already done so, install the Remi and EPEL repositories

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -Uvh epel-release-latest-6.noarch.rpm

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-release-6*.rpm

3. Enable the REMI repository globally:


vi /etc/yum.repos.d/remi.repo

Under the section that looks like [remi] and [remi-php56] change the following

enabled=0 to enabled=1

4. Upgrade PHP 5.3 to PHP 5.6

yum -y upgrade php*

let’s verify that you have PHP 5.6 installed:

 php -v

PHP 5.6.14 (cli) (built: Sep 30 2015 14:07:43)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

Thursday, February 22, 2018

Error when starting Docker from Jenkins

Error:

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.27/images/json: dial unix /var/run/docker.sock: connect: permission denied

I am running jenkins as a user 'myuser'

Solution :

usermod -a -G root myuser
service jenkins restart

 

Tuesday, February 20, 2018

Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Docker Error : Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

[root@sv23 ~]# docker build -t my-apache2 .
Sending build context to Docker daemon 64.16 MB
Step 1/1 : FROM httpd:2.4
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
[root@sv23 ~]# 


When I build a dockerfile, I am getting the above error.

How we can fix this?

1. Login to host.
2. mkdir -p /etc/systemd/system/docker.service.d
3. /etc/systemd/system/docker.service.d/http-proxy.conf
4. Add the following line
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/"
[Service]
Environment="HTTPS_PROXY=https://proxy.example.com:443/"
5. systemctl daemon-reload
6. systemctl restart docker
7. systemctl show --property=Environment docker

Try the build now, it will works!

[root@sv23 ~]#  docker build -t my-apache2 .
Sending build context to Docker daemon 64.16 MB
Step 1/1 : FROM httpd:2.4
2.4: Pulling from library/httpd
4176fe04cefe: Pull complete
d6c01cf91b98: Pull complete
b7066921647a: Pull complete
643378aaba88: Pull complete
3c51f6dc6a3b: Pull complete
4f25e420c4cc: Pull complete
ccdbe37da15c: Pull complete
Digest: sha256:6e61d60e4142ea44e8e69b22f1e739d89e1dc8a2764182d7eecc83a5bb31181e
Status: Downloaded newer image for httpd:2.4
 ---> 01154c38b473
Successfully built 01154c38b473
[root@sv23 ~]#