1

I'm totally new to linux and trying to upgrade php5.6 to php7. I followed the steps in a tutorial and in step 5 it told me to remove php so i did. In step 6 i had to use that command and all should be fine:

yum --enablerepo=remi-php70 install php70-php php70-php-pear php70-php-bcmath php70-php-pecl-jsond-devel php70-php-mysqlnd php70-php-gd php70-php-common php70-php-fpm php70-php-intl php70-php-cli php70-php php70-php-xml php70-php-opcache php70-php-pecl-apcu php70-php-pecl-jsond php70-php-pdo php70-php-gmp php70-php-process php70-php-pecl-imagick php70-php-devel php70-php-mbstring

But console said i needed these dependencies to install php7. Also there is an error says "libdb4 conflicts with filesystem".

Output:

Error: Package: rpm-4.8.0-55.el6.x86_64 (base) Requires: libdb-4.7.so()(64bit) Available: db4-4.7.25-22.el6.x86_64 (base) libdb-4.7.so()(64bit)

Error: Package: iproute-2.6.32-54.el6.x86_64 (base) Requires: libdb-4.7.so()(64bit) Available: db4-4.7.25-22.el6.x86_64 (base) libdb-4.7.so()(64bit)

Error: Package: apr-util-1.3.9-3.el6_0.1.x86_64 (base) Requires: libdb-4.7.so()(64bit) Available: db4-4.7.25-22.el6.x86_64 (base) libdb-4.7.so()(64bit)

Error: Package: libdb4-utils-4.8.30-13.el7.x86_64 (epel) Requires: libc.so.6(GLIBC_2.14)(64bit)

Error: Package: libdb4-4.8.30-13.el7.x86_64 (epel) Requires: libc.so.6(GLIBC_2.17)(64bit)

Error: Package: httpd-tools-2.2.15-115.el6.1.x86_64 (vesta) Requires: libdb-4.7.so()(64bit) Available: db4-4.7.25-22.el6.x86_64 (base) libdb-4.7.so()(64bit)

Error: Package: pam-1.1.1-24.el6.x86_64 (base) Requires: libdb-4.7.so()(64bit) Available: db4-4.7.25-22.el6.x86_64 (base) libdb-4.7.so()(64bit)

Error: libdb4 conflicts with filesystem-2.4.30-3.el6.x86_64

Error: Package: httpd-2.2.15-115.el6.1.x86_64 (vesta) Requires: libdb-4.7.so()(64bit) Available: db4-4.7.25-22.el6.x86_64 (base) libdb-4.7.so()(64bit)

Error: Package: cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64 (base) Requires: libdb-4.7.so()(64bit) Available: db4-4.7.25-22.el6.x86_64 (base) libdb-4.7.so()(64bit)

Error: Package: rpm-libs-4.8.0-55.el6.x86_64 (base) Requires: libdb-4.7.so()(64bit) Available: db4-4.7.25-22.el6.x86_64 (base) libdb-4.7.so()(64bit)

You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

(I made a lot of search in google tried to download one by one but when I try to install a rpm i downloaded, it requires another dependencies. And it looks like it is going to ask for dependencies forever. I tried to find a command that will find all dependencies and install, it didnt work. I got the same output)

Is there a way to Install php7 or a way to get php5.6 back?

  • Welcome to SO. Don't know yum, but I am almost sure you can unistall those packages, eventually force fixing those errors. Try searching serverfault. What you face is known as dependency hell. I am not sure that an install compiling from php7 source wouldn't face the same problems, I think it will. Maybe try upgrading your centos version. – progmatico Mar 10 '18 at 00:46
  • Thank you. I wish I had some experince to remove and reinstall those packages but I dont even know what they are system file or not, would I crash the machine or not. First time using linux :/ Its not my computer, I rented it to host my websites. – Sezer Toker Mar 12 '18 at 02:13

1 Answers1

1

Error: Package: libdb4-utils-4.8.30-13.el7.x86_64 (epel) Requires: libc.so.6(GLIBC_2.14)(64bit)

Looks like you are trying to mix repository from CentOS 6 and CentOS 7 (the el7 suffix), probably EPEL.

See yum repolist to see which repository need to be fixed.

So remove what is needed, at least

yum remove epel-release
yum clean all

To install any PHP version on CentOS from my repository, see the Wizard instructions

Remi Collet
  • 6,198
  • 1
  • 20
  • 25
  • Thank you for your answer. I executed those 3 commands in your reply then I tried to follow wizard's instruction but "yum update" gives tons of error https://hastebin.com/ivesahizik.rb – Sezer Toker Mar 12 '18 at 02:10
  • According to your paste, you are still using EPEL-7 instead of EPEL-6 – Remi Collet Mar 12 '18 at 05:11
  • Hmm. I rechecked with "yum repolist" command and it says its EPEL-6 but when I try to install, update or remove something it shows it as EPEL-7. I think my OS messed up. I told my server provider to reinstall OS as centOS7. Thank you for your help, I upvote your reply. – Sezer Toker Mar 12 '18 at 21:07