LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-13-2011, 01:39 PM   #1
Jebuswankel
LQ Newbie
 
Registered: Jan 2011
Distribution: Ubuntu, Debian
Posts: 13

Rep: Reputation: 0
dependency problems: cp: preserving permissions for `/var/lib/ucf/hashfile.7': Permis


My Debian Squeeze server that I'm trying to make a LAMP server is currently a LAM server. I get these errors when trying to install php5:

Code:
$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up libapache2-mod-php5 (5.3.3-7) ...
cp: preserving permissions for `/var/lib/ucf/hashfile.7': Permission denied
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.3.3-7) | libapache2-mod-php5filter (>= 5.3.3-7) | php5-cgi (>= 5.3.3-7); however:
  Package libapache2-mod-php5 is not configured yet.
  Package libapache2-mod-php5filter is not installed.
  Package php5-cgi is not installed.
dpkg: error processing php5 (--configure):
 dependency problems - leaving unconfigured
configured to not write apport reports
                                      configured to not write apport reports
                                                                            Errors were encountered while processing:
 libapache2-mod-php5
 php5
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried sudo dpkg --configure --pending and apt-get install -f to no avail. Any ideas?
 
Old 01-14-2011, 10:20 PM   #2
evo2
Senior Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,563

Rep: Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626
Quote:
Originally Posted by Jebuswankel View Post
Any ideas?
Check the permissions on /var/lib/ucf/hashfile.7

Evo2.
 
Old 01-15-2011, 11:32 PM   #3
Jebuswankel
LQ Newbie
 
Registered: Jan 2011
Distribution: Ubuntu, Debian
Posts: 13

Original Poster
Rep: Reputation: 0
Here are the permissions for hashfile.7
Code:
/var/lib/ucf$ ls -l
total 0
drwxr-xr-x 2 root root 0 Jan 12 02:37 cache
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.0
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.1
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.2
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.3
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.4
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.5
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.6
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.7
-rw-r--r-- 1 root root 0 Jan 12 02:37 registry
What does it matter what the permissions of the file are? I'm running `sudo apt-get install` so doesn't that mean it can deal with any file? I tried running sudo su and then running apt-get but I get the same output.
 
Old 01-15-2011, 11:52 PM   #4
evo2
Senior Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,563

Rep: Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626
Quote:
Originally Posted by Jebuswankel View Post
Here are the permissions for hashfile.7
Code:
/var/lib/ucf$ ls -l
total 0
drwxr-xr-x 2 root root 0 Jan 12 02:37 cache
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.0
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.1
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.2
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.3
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.4
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.5
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.6
-rw-r--r-- 1 root root 0 Jan 12 02:37 hashfile.7
-rw-r--r-- 1 root root 0 Jan 12 02:37 registry
Hmm, looks ok.
Quote:
What does it matter what the permissions of the file are?
Did you ready the error message?

Quote:
I'm running `sudo apt-get install` so doesn't that mean it can deal with any file?
No. The file could still be set to be unreadable or unwritable by root.
Quote:
I tried running sudo su and then running apt-get but I get the same output.
I suggest that you look at the post install script (/var/lib/dpkg/info/libapache2-mod-php5.postinst) and try to understand exactly what is happening.

Evo2.
 
Old 01-21-2011, 09:16 PM   #5
Jebuswankel
LQ Newbie
 
Registered: Jan 2011
Distribution: Ubuntu, Debian
Posts: 13

Original Poster
Rep: Reputation: 0
I browsed the ucf man page but didn't get much out of it, then I found the ucf line in the post install script /var/lib/dpkg/info/libapache2-mod-php5.postinst and added the -v flag to get verbose output. Now here's what I get:
Code:
$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up libapache2-mod-php5 (5.3.3-7) ...
ucf: The new file is /usr/share/php5/php.ini-production
ucf: The Destination file is /etc/php5/apache2/php.ini
ucf: The Source directory is /usr/share/php5
ucf: The State directory is /var/lib/ucf
The hash file exists
egrep [[:space:]]\/etc\/php5\/apache2\/php\.ini$ /var/lib/ucf/hashfile
ucf: The new file is /usr/share/php5/php.ini-production
ucf: The Destination file is /etc/php5/apache2/php.ini
ucf: The Source directory is /usr/share/php5
ucf: The State directory is /var/lib/ucf
The hash file exists
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 128
dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.3.3-7) | libapache2-mod-php5filter (>= 5.3.3-7) | php5-cgi (>= 5.3.3-7); however:
  Package libapache2-mod-php5 is not configured yet.
  Package libapache2-mod-php5filter is not installed.
  Package php5-cgi is not installed.
dpkg: error processing php5 (--configure):
 dependency problems - leaving unconfigured
configured to not write apport reports
                                      configured to not write apport reports
                                                                            Errors were encountered while processing:
 libapache2-mod-php5
 php5
E: Sub-process /usr/bin/dpkg returned an error code (1)
Then I tried throwing in the -n option so that the ucf line wouldn't do anything and I got the install to succeed. Do you see any potential problems that might arise from having done that? I guess I should be fine since this was a fresh install of Debian. I didn't have php installed before. Here was the output:
Code:
$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up libapache2-mod-php5 (5.3.3-7) ...
*** ERROR: Need exactly two arguments, got 3

Debian GNU/Linux ucf $Revision: 1.26 $.
           Copyright (C) 2002-2005 Manoj Srivastava.
This is free software; see the GNU General Public Licence for copying
conditions.  There is NO warranty.

Usage: ucf  [options] new_file  destination
Options:
     -h,     --help          print this message
     -s foo, --src-dir  foo  Set the src dir (historical md5sums live here)
             --sum-file bar  Force the historical md5sums to be read from
                             this file.  Overrides any setting of --src-dir.
     -d [n], --debug    [n]  Set the Debug level to N
     -n,     --no-action     Dry run. No action is actually taken.
     -v,     --verbose       Make the script verbose
             --three-way     Register this file in the cache, and turn on the
                             diff3 option allowing the merging of maintainer
                             changes into a (potentially modified) local 
                             configuration file. )
             --state-dir bar Set the state directory to bar instead of the
                             default '/var/lib/ucf'. Used mostly for testing.
             --debconf-ok    Indicate that it is ok for uct to use an already
                             running debconf instance for prompting.
             --debconf-template bar
                             Specify an alternate, caller-provided debconf
                             template to use for prompting.
Usage: ucf  -p  destination
     -p,     --purge         Remove any reference to destination from records

By default, the directory the new_file lives in is assumed to be the src-dir,
which is where we look for any historical md5sums.

Reloading web server config: apache2.
Setting up php5 (5.3.3-7) ...
remote@olpc:~$ sudo apt-get install libapache2-mod-php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libapache2-mod-php5 is already the newest version.
libapache2-mod-php5 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Last edited by Jebuswankel; 01-21-2011 at 09:17 PM.
 
  


Reply

Tags
lamp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tar not preserving permissions? BassKozz Linux - Newbie 6 06-03-2009 12:36 PM
Preserving Permissions RemusX2 Linux - Software 2 07-10-2005 11:20 AM
Moving /var/adm and /var/lib - why does it hurt? J_Szucs Linux - General 1 09-15-2004 06:46 PM
scp with preserving permissions pradi_net Linux - Software 1 06-08-2004 08:00 AM
Preserving permissions when using cp pilot1 Linux - General 2 08-16-2003 05:29 AM


All times are GMT -5. The time now is 01:18 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration