Debian This forum is for the discussion of Debian Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-13-2011, 01:39 PM
|
#1
|
|
LQ Newbie
Registered: Jan 2011
Distribution: Ubuntu, Debian
Posts: 13
Rep:
|
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?
|
|
|
|
01-14-2011, 10:20 PM
|
#2
|
|
Senior Member
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,563
|
Quote:
Originally Posted by Jebuswankel
Any ideas?
|
Check the permissions on /var/lib/ucf/hashfile.7
Evo2.
|
|
|
|
01-15-2011, 11:32 PM
|
#3
|
|
LQ Newbie
Registered: Jan 2011
Distribution: Ubuntu, Debian
Posts: 13
Original Poster
Rep:
|
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.
|
|
|
|
01-15-2011, 11:52 PM
|
#4
|
|
Senior Member
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,563
|
Quote:
Originally Posted by Jebuswankel
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.
|
|
|
|
01-21-2011, 09:16 PM
|
#5
|
|
LQ Newbie
Registered: Jan 2011
Distribution: Ubuntu, Debian
Posts: 13
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:18 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|