New IT forum
27 June 2022, 11:59:09 am *
Welcome, %1$s. Please login or register.

: CubieBoard 2 and Cubietruck both now in stock.
 
Pages: [1]

Author Topic: [Solved] apt-get update problem after moving /var/lib/apt/lists to usb drive  (Read 8781 times)

th67

  • Newbie
  • *
  • Posts: 5

Hi!
I am trying to set up a lamp server on the new sheeva plug that I received a few days ago. Apache2 and mysql were installed in no time, but 5 packages are missing to install php5 and phpmyadmin:
Code: [Select]
[email protected]:/# apt-get install phpmyadmin  
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  apache2-mpm-prefork dbconfig-common defoma fontconfig-config libapache2-mod-php5
  libfontconfig1 libfreetype6 libgd2-xpm libjpeg62 libltdl7 libmcrypt4 libpng12-0 libt1-5
  libxml2 libxpm4 php5-common php5-gd php5-mcrypt php5-mysql sgml-base ttf-dejavu
  ttf-dejavu-core ttf-dejavu-extra ucf xml-core
Suggested packages:
  defoma-doc psfontmgr x-ttcidfont-conf dfontmgr libft-perl php-pear libgd-tools
  libmcrypt-dev mcrypt sgml-base-doc debhelper
The following packages will be REMOVED:
  apache2-mpm-worker
The following NEW packages will be installed:
  apache2-mpm-prefork dbconfig-common defoma fontconfig-config libapache2-mod-php5
  libfontconfig1 libfreetype6 libgd2-xpm libjpeg62 libltdl7 libmcrypt4 libpng12-0 libt1-5
  libxml2 libxpm4 php5-common php5-gd php5-mcrypt php5-mysql phpmyadmin sgml-base ttf-dejavu
  ttf-dejavu-core ttf-dejavu-extra ucf xml-core
0 upgraded, 26 newly installed, 1 to remove and 3 not upgraded.
Need to get 13.3MB/14.4MB of archives.
After this operation, 36.9MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ports.ubuntu.com jaunty/main dbconfig-common 1.8.40 [488kB]
Get:2 http://ports.ubuntu.com jaunty/main defoma 0.11.10-0.2ubuntu1 [101kB]
Get:3 http://ports.ubuntu.com jaunty/main ttf-dejavu-core 2.28-1 [1429kB]
Get:4 http://ports.ubuntu.com jaunty/main ttf-dejavu-extra 2.28-1 [3092kB]
Get:5 http://ports.ubuntu.com jaunty/main ttf-dejavu 2.28-1 [3104B]                          
Get:6 http://ports.ubuntu.com jaunty/main fontconfig-config 2.6.0-1ubuntu12 [51.6kB]        
Get:7 http://ports.ubuntu.com jaunty/main libfontconfig1 2.6.0-1ubuntu12 [115kB]            
Get:8 http://ports.ubuntu.com jaunty/main libjpeg62 6b-14 [91.0kB]                          
Get:9 http://ports.ubuntu.com jaunty/main libpng12-0 1.2.27-2ubuntu2 [164kB]                
Get:10 http://ports.ubuntu.com jaunty/main libxpm4 1:3.5.7-1 [38.2kB]                        
Get:11 http://ports.ubuntu.com jaunty/main libgd2-xpm 2.0.36~rc1~dfsg-3ubuntu1 [208kB]      
Get:12 http://ports.ubuntu.com jaunty/main libltdl7 2.2.6a-1ubuntu1 [293kB]                  
Get:13 http://ports.ubuntu.com jaunty/universe libmcrypt4 2.5.7-5ubuntu1 [85.6kB]            
Get:14 http://ports.ubuntu.com jaunty/main libt1-5 5.1.2-3 [170kB]                          
Get:15 http://ports.ubuntu.com jaunty/universe php5-mcrypt 5.2.6-0ubuntu2 [16.6kB]          
Get:16 http://ports.ubuntu.com jaunty/universe phpmyadmin 4:3.1.2-1 [3612kB]                
Err http://ports.ubuntu.com jaunty-security/main php5-common 5.2.6.dfsg.1-3ubuntu4.1        
  404 Not Found
Err http://ports.ubuntu.com jaunty-security/main libapache2-mod-php5 5.2.6.dfsg.1-3ubuntu4.1
  404 Not Found
Err http://ports.ubuntu.com jaunty-security/main libfreetype6 2.3.9-4ubuntu0.1              
  404 Not Found
Err http://ports.ubuntu.com jaunty-security/main php5-gd 5.2.6.dfsg.1-3ubuntu4.1            
  404 Not Found
Err http://ports.ubuntu.com jaunty-security/main php5-mysql 5.2.6.dfsg.1-3ubuntu4.1          
  404 Not Found
Fetched 9958kB in 14s (680kB/s)                                                              
Failed to fetch http://ports.ubuntu.com/pool/main/p/php5/php5-common_5.2.6.dfsg.1-3ubuntu4.1_armel.deb  404 Not Found
Failed to fetch http://ports.ubuntu.com/pool/main/p/php5/libapache2-mod-php5_5.2.6.dfsg.1-3ubuntu4.1_armel.deb  404 Not Found
Failed to fetch http://ports.ubuntu.com/pool/main/f/freetype/libfreetype6_2.3.9-4ubuntu0.1_armel.deb  404 Not Found
Failed to fetch http://ports.ubuntu.com/pool/main/p/php5/php5-gd_5.2.6.dfsg.1-3ubuntu4.1_armel.deb  404 Not Found
Failed to fetch http://ports.ubuntu.com/pool/main/p/php5/php5-mysql_5.2.6.dfsg.1-3ubuntu4.1_armel.deb  404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
[email protected]:/#

This is what the /etc/apt/sources.list looks like:
Code: [Select]
[email protected]:/# cat /etc/apt/sources.list
deb http://ports.ubuntu.com/ jaunty main restricted universe multiverse
deb http://ports.ubuntu.com/ jaunty-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ jaunty-security main restricted universe multiverse
[email protected]:/#

Is there another repository that I can try?
« Last Edit: 11 September 2010, 10:23:46 am by th67 »
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Repository for php5-related packages?
« Reply #1 on: 10 September 2010, 10:05:51 am »

My guess is that you didn't precede with:

Code: [Select]
apt-get update
apt-get upgrade

As you can see, the version of php5-common that is current is php5-common_5.2.6.dfsg.1-3ubuntu4.5_armel.deb, not php5-common 5.2.6.dfsg.1-3ubuntu4.1:

http://ports.ubuntu.com/pool/main/p/php5/
Logged

th67

  • Newbie
  • *
  • Posts: 5
Re: Repository for php5-related packages?
« Reply #2 on: 10 September 2010, 07:54:36 pm »

Thanks, Marcus, for your answer.
I did run apt-get update and apt-get upgrade, but still have the same errors: apt insists on getting ~ubuntu4.1 packages instead of ~ubuntu4.5.
Besides, a few more packages don't upgrade correctly:
Code: [Select]
[email protected]:~# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  libvolume-id1 ntpdate udev
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 499kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://ports.ubuntu.com jaunty-updates/main libvolume-id1 141-1.1
  404 Not Found
Err http://ports.ubuntu.com jaunty-updates/main udev 141-1.1
  404 Not Found
Err http://ports.ubuntu.com jaunty-updates/main ntpdate 1:4.2.4p4+dfsg-7ubuntu5.1
  404 Not Found
Err http://ports.ubuntu.com jaunty-security/main ntpdate 1:4.2.4p4+dfsg-7ubuntu5.1
  404 Not Found
Failed to fetch http://ports.ubuntu.com/pool/main/u/udev/libvolume-id1_141-1.1_armel.deb  404 Not Found
Failed to fetch http://ports.ubuntu.com/pool/main/u/udev/udev_141-1.1_armel.deb  404 Not Found
Failed to fetch http://ports.ubuntu.com/pool/main/n/ntp/ntpdate_4.2.4p4+dfsg-7ubuntu5.1_armel.deb  404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I'm really at a loss...
Logged

th67

  • Newbie
  • *
  • Posts: 5
Re: Repository for php5-related packages?
« Reply #3 on: 11 September 2010, 08:29:46 am »

The problem is solved. This is what happened:

After figuring out how much space a lamp server + vsftpd server + (what else?) would take, I copied some very bulky files (/var/cache/apt and /var/lib/apt/lists) to an ext3 partition of a usb hard drive (FreeAgent Drive, 500 GB), renamed the original files as .bak and symlinked to the hard drive.
Installation of vsftpd, apache2 and mysql (apt-get install) went fine, and the new packages made their way into the cache on the hard drive, so I thought it was safe to remove the .bak files and make space for the rest of the installation. My mistake!!!
Copying had changed the modification date of every file in /var/lib/apt/lists to current date. As a result /var/lib/apt/lists/Release appeared more recent than the Release file of the repository, and apt-get update didn't work!

To restore the modification date to an earlier date (based on other files in /var/lib) , I did:
Code: [Select]
[email protected]:/var/lib/apt/lists# touch -m -t 0905270000 ports.ubuntu.com_dists_jaunty-updates_Release
[email protected]:/var/lib/apt/lists# touch -m -t 0905270000 ports.ubuntu.com_dists_jaunty-updates_Release.gpg

Then the Release file was updated  correctly :)

After installing the 2 servers, the root file system still has plenty of space left:
Code: [Select]
[email protected]:/# df -h /    
Filesystem            Size  Used Avail Use% Mounted on
rootfs                462M  218M  240M  48% /

[Edit] Forgot to mention: before changing the modification date on the Release and Release.gpg files, I had moved /var/lib/apt/lists back to its original place. I could have gained some more space by leaving that folder on the external drive.
« Last Edit: 11 September 2010, 10:56:08 am by th67 »
Logged

th67

  • Newbie
  • *
  • Posts: 5
Re: Repository for php5-related packages?
« Reply #4 on: 11 September 2010, 08:43:27 am »

If it's OK, I would like to change the title of this post to something like "[Solved] Problem with apt-get update after moving /var/lib/apt/lists to an external drive.
« Last Edit: 11 September 2010, 08:47:24 am by th67 »
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Repository for php5-related packages?
« Reply #5 on: 11 September 2010, 09:58:37 am »

If it's OK, I would like to change the title of this post to something like "[Solved] Problem with apt-get update after moving /var/lib/apt/lists to an external drive.

Thanks for letting us know that you figured out the problem. You are welcome to change the title.
Logged

th67

  • Newbie
  • *
  • Posts: 5

Title changed.
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!