LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 06-18-2015, 02:26 AM   #1
ghaonga
LQ Newbie
 
Registered: Jun 2015
Posts: 1

Rep: Reputation: Disabled
Thumbs up SOLUTIONS for - Package(s) php available, but not installed/ can't remove php


I want to share my knowledge to others who faced similar problem

---------------------------------------------------------------------
when i tried to remove php using yum remove --- i got this message

[root@localhost ~]# yum remove php
Loaded plugins: fastestmirror, refresh-packagekit, replace, security
Setting up Remove Process
No Match for argument: php
Loading mirror speeds from cached hostfile
* base: mirror.aptus.co.tz
* epel: mirror.nl.leaseweb.net
* extras: mirror.aptus.co.tz
* updates: mirror.aptus.co.tz
* webtatic: uk.repo.webtatic.com
Package(s) php available, but not installed.
No Packages marked for removal

Then I used this code to check the existing version
---------------------------------------------------

code: # rpm -qa |grep php

root@localhost ~]# rpm -qa|grep php
php55w-cli-5.5.24-1.w6.x86_64
php55w-devel-5.5.24-1.w6.x86_64
php55w-common-5.5.24-1.w6.x86_64
php55w-mbstring-5.5.24-1.w6.x86_64
php55w-gd-5.5.24-1.w6.x86_64
php55w-mcrypt-5.5.24-1.w6.x86_64
php55w-mysql-5.5.23-1.w6.x86_64
php55w-pdo-5.5.24-1.w6.x86_64
php55w-ldap-5.5.24-1.w6.x86_64

Solution to this problem
-------------------------
the easiest way to do this, is to use yum remove then php version extension....you can either copy each from above as shown below

# yum remove php55w-pdo-5.5.24-1.w6.x86_64

Repeat this until all the version package are removed (remember to use rpm -qa|grep php to check which packages are still remained)

# yum remove php55w-common-5.5.24-1.w6.x86_64

Last edited by ghaonga; 06-18-2015 at 02:28 AM.
 
Old 06-18-2015, 08:30 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
As an FYI the remove "php" failed because you had no package named simply "php".

php55w-cli-5.5.24-1.w6.x86_64
php55w-devel-5.5.24-1.w6.x86_64
php55w-common-5.5.24-1.w6.x86_64
php55w-mbstring-5.5.24-1.w6.x86_64
php55w-gd-5.5.24-1.w6.x86_64
php55w-mcrypt-5.5.24-1.w6.x86_64
php55w-mysql-5.5.23-1.w6.x86_64
php55w-pdo-5.5.24-1.w6.x86_64
php55w-ldap-5.5.24-1.w6.x86_64

In general the naming of packages in RedHat style OSes (RHEL, CentOS, Fedora, Scientific etc...) everything from the first dash that is followed by a numeral is part of the versioning and/or architecture. So the packages you had were all based on php55w and you had multiple packages in that family. You could do the remove by specifying everything up to that point as just:
php55w-cli
php55w-devel
php55w-common
php55w-mbstring
php55w-gd
php55w-mcrypt
php55w-mysql
php55w-pdo
php55w-ldap
As those are the package names. The 5.5.24 is the base upstream package version number and the 1.w6 is the extended versioning for RHEL/CentOS showing the modified version of that base upstream. RHEL/CentOS backports security and some enhancements into the original base upstream which is why there is extended versioning.

You typically don't have to remove packages and reinstall you can do "yum update php55w-cli" to get the newer extended version from the repository but it will have the same base upstream version. The only reason to remove would be if you wanted to upgrade to a newer upstream version that isn't in the repository.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Dependency: php-common = 5.1.6-27.el5_7.4 is needed by package php-gd-5.1.6-2 paul1107 Linux - Server 2 01-25-2012 03:29 AM
Open edit Php file problem (PhP apache installed) waerfwe Programming 3 06-30-2011 09:29 AM
installed php and apache yet my php pages dont load ?? jessica_lilly Linux - Software 1 11-13-2007 01:57 AM
PHP5 Upgrade Error: Missing Dependency: php = 4.3.x is needed by package php-pear vsystems Linux - Server 1 05-02-2007 07:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 07:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration