Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22nd May 2009, 12:07 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
Unhappy how to do a TOTALLY fresh reinstall of a package

I am new to Fedora, but I did a lot of search, could not find a right answer.

I like yum install, it makes life easier. I yum install php, php-devel, etc. Everything worked fine. php version is 5.2.6.

Because I wanted to try out some features in php 5.2.9, I downloaded and compiled the php source. And trial, I deleted php 5.2.9.

The problem came because I did not delete php 5.2.9 properly. How to delete it properly is another issue. The problem happened. Now I just want to get original package back. I use yum erase/reinstall many times but it seems to me that Fedora knows this is not my first time install the software package.

The first time yum install php, it put /usr/bin/php, php-cgi, /etc/php.ini etc in the right place. Now it did not do that. Although I could copy these files back manually, I might miss some other files I did not notice.

I just want to achieve the status the first time yum install php. I can not find a way out (except reinstalling Fedora from scratch). Help please!
Reply With Quote
  #2  
Old 22nd May 2009, 12:10 PM
ilja Offline
Registered User
 
Join Date: Apr 2004
Location: Euregio
Posts: 3,613
Normally you can do
Code:
uninstall
in the place where the original sourcecode of you installation is. This should uninstall the compiled package.
In the future you should use self-compiled RPMs when playing around with vanilla versions.
Reply With Quote
  #3  
Old 22nd May 2009, 12:24 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
but not, how can I yum install php as if it was first time?
Reply With Quote
  #4  
Old 22nd May 2009, 12:29 PM
ilja Offline
Registered User
 
Join Date: Apr 2004
Location: Euregio
Posts: 3,613
Quote:
I use yum erase/reinstall many times but it seems to me that Fedora knows this is not my first time install the software package.
What are you doing exactly and what are the messages you receive as response.
Reply With Quote
  #5  
Old 22nd May 2009, 12:46 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
If I run "yum erase php", the system just prompt "is this ok", then progress from 0 to 100% without error.

Ditto "yum install php" or "yum reinstall php".

However, after installation, /usr/bin/php, /usr/bin/php-cgi, /etc/php.ini, etc, are not there. I don't know what yum has installed.

I guess I need clean up something or update something before yum can really install php again.
Reply With Quote
  #6  
Old 22nd May 2009, 01:33 PM
ilja Offline
Registered User
 
Join Date: Apr 2004
Location: Euregio
Posts: 3,613
Does
Code:
whereis php
answers something meaningfull?
Reply With Quote
  #7  
Old 22nd May 2009, 01:54 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
it response

php: /etc/php.d /usr/lib/php /usr/local/bin/php /usr/local/lib/php /usr/include/php /usr/share/php /usr/share/man/man1/php.1.gz /usr/share/man/man1/php.1

/user/local/bin is the place I manually installed php-5.2.9 (as default). I had deleted /user/local/bin/php because I wanted to use yum install php 5.2.6.
Reply With Quote
  #8  
Old 22nd May 2009, 02:03 PM
ilja Offline
Registered User
 
Join Date: Apr 2004
Location: Euregio
Posts: 3,613
What is the answer of
Code:
php --version
Reply With Quote
  #9  
Old 22nd May 2009, 02:08 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,075
Quote:
Originally Posted by aplexpress View Post
I
However, after installation, /usr/bin/php, /usr/bin/php-cgi, /etc/php.ini, etc, are not there.
/usr/bin/php and /usr/bin/php-cgi are from package php-cli, and /etc/php.ini is from php-common. What's the output of:
Code:
rpm -qa  'php*'
Reply With Quote
  #10  
Old 22nd May 2009, 02:39 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
Quote:
Originally Posted by ilja View Post
What is the answer of
Code:
php --version
Because I deleted php, php --version just gave a message: no such file or directory
Reply With Quote
  #11  
Old 22nd May 2009, 02:45 PM
ilja Offline
Registered User
 
Join Date: Apr 2004
Location: Euregio
Posts: 3,613
And what did the message suggested by markukk return?
Reply With Quote
  #12  
Old 22nd May 2009, 02:46 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
Quote:
Originally Posted by markkuk View Post
/usr/bin/php and /usr/bin/php-cgi are from package php-cli, and /etc/php.ini is from php-common. What's the output of:
Code:
rpm -qa  'php*'
I should blame myself - I never thought php, php-cgi, php.ini are not from php. Thanks thanks...

After yum install php php-cli php-common, now they are back. However, when I type php --version, system still try to find php at /usr/local/bin (no such file or directory). How to change the default path?

rpm -qa 'php*' gave me the following -
# rpm -qa 'php*'
php-imap-5.2.6-5.i386
php-mysql-5.2.6-5.i386
php-mbstring-5.2.6-5.i386
php-cli-5.2.6-5.i386
php-mhash-5.2.6-5.i386
php-pdo-5.2.6-5.i386
php-gd-5.2.6-5.i386
php-magickwand-1.0.7-2.fc10.i386
php-mssql-5.2.6-5.i386
php-xml-5.2.6-5.i386
php-xmlrpc-5.2.6-5.i386
php-dba-5.2.6-5.i386
php-common-5.2.6-5.i386
php-snmp-5.2.6-5.i386
php-odbc-5.2.6-5.i386
php-ldap-5.2.6-5.i386
php-soap-5.2.6-5.i386
php-pgsql-5.2.6-5.i386
php-5.2.6-5.i386
php-bcmath-5.2.6-5.i386
php-mapserver-5.2.2-1.fc10.i386
php-tidy-5.2.6-5.i386
php-shout-0.9.2-2.fc10.i386
php-mcrypt-5.2.6-5.i386
Reply With Quote
  #13  
Old 22nd May 2009, 02:48 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
Quote:
Originally Posted by ilja View Post
And what did the message suggested by markukk return?
what is markukk? seems not a command
Reply With Quote
  #14  
Old 22nd May 2009, 02:57 PM
nico80 Offline
Registered User
 
Join Date: Dec 2007
Location: Edinburgh
Age: 33
Posts: 111
Anyway, for instruction on how to force yum to reinstall a package, see:
http://www.fedoraforum.org/forum/sho...d.php?t=119863
Reply With Quote
  #15  
Old 22nd May 2009, 04:08 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
I got php back. Thanks!

There is only one minor fault left -

When I type "php-cgi -v", it is fine, shows the correct version

However, when I type "php --version", it still says "-bash: /usr/local/bin/php: No such file or directory"

Why the system can find php-cgi but not php? How can I tell the system php has been installed at /user/bin?
Reply With Quote
Reply

Tags
fresh, package, reinstall, totally

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to force yum to reinstall a package... wizard Guides & Solutions (No Questions) 12 22nd May 2009 08:50 PM
Downgrading and reinstall package patrox Using Fedora 6 7th June 2008 10:20 AM
FC8 fresh installation ( fish package issue ) tomas.bean Installation, Upgrades and Live Media 2 27th March 2008 09:53 AM
HELP!!! Yum totally broken craigni Using Fedora 19 14th October 2006 04:13 AM
Totally new to this. S3xyNaniGoat Servers & Networking 10 2nd April 2005 02:18 PM


Current GMT-time: 04:51 (Wednesday, 20-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat