How to skip or ignore this removing process so that upgrading can take place

Asked by Rajinder Sandhu

sir
 this is the output of apt-get upgrade....please help me to fix this problem, I am using ubuntu 10.10 and there are about 232 Mb of pkg upgrading is waiting to be installed, system can not do it because these are hurdles you can refer the pasted text below........

141 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 611kB/232MB of archives.
After this operation, 150MB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://ubuntuarchive.hnsdc.com/ubuntu/ maverick-proposed/main xkb-data all 1.8-1ubuntu8.1~10.10.1 [440kB]
Get:2 http://ubuntuarchive.hnsdc.com/ubuntu/ maverick-proposed/main bash-completion all 1:1.2-2ubuntu1.1 [140kB]
Get:3 http://ubuntuarchive.hnsdc.com/ubuntu/ maverick-proposed/main kdesudo i386 3.4.2.3-2ubuntu2.1 [31.5kB]
Fetched 611kB in 10s (59.2kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 285626 files and directories currently installed.)
Removing linux-headers-2.6.31-16 ...
dpkg: error processing linux-headers-2.6.31-16 (--remove):
 unable to securely remove '/usr/src/linux-headers-2.6.31-16/drivers/pci/pcie/aer/Makefile': Not a directory
Removing linux-headers-2.6.31-20 ...
dpkg: error processing linux-headers-2.6.31-20 (--remove):
 unable to securely remove '/usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile': Not a directory
Errors were encountered while processing:
 linux-headers-2.6.31-16
 linux-headers-2.6.31-20
E: Sub-process /usr/bin/dpkg returned an error code (1)
dads@dads-desktop:~$

Thanks
Rajinder

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

file /usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile

Thanks

Revision history for this message
Rajinder Sandhu (sandy744) said :
#2

Hi,
This is the output ...

dads@dads-desktop:~$ file /usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile
/usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile: ERROR: cannot open `/usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile' (Not a directory)
dads@dads-desktop:~$

Also pl note that these files do not exist in the specified folders.

Thanks
Rajinder

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

ok then run:

sudo mkdir -p /usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile

Then rerun the command which made the initial command.

Should be ok

Revision history for this message
Rajinder Sandhu (sandy744) said :
#4

it is not getting created..see the output..
dads@dads-desktop:~$ sudo mkdir -p /usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile
[sudo] password for dads:
mkdir: cannot create directory `/usr/src/linux-headers-2.6.31-20/arch/mips/fw': Not a directory
dads@dads-desktop:~$

regards
Rajinder
--------------------------------------------------------------------

Revision history for this message
Rajinder Sandhu (sandy744) said :
#5

same is the the output with other file also...
dads@dads-desktop:~$ sudo mkdir -p /usr/src/linux-headers-2.6.31-16/drivers/pci/pcie/aer/Makefile
mkdir: cannot create directory `/usr/src/linux-headers-2.6.31-16/drivers/pci/pcie': Not a directory
dads@dads-desktop:~$
what to do next ?
Regards
Rajinder
---------------------------------------------------------------------

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

Try:

sudo mkdir -p /usr/src/linux-headers-2.6.31-20/arch/mips/fw

Revision history for this message
Rajinder Sandhu (sandy744) said :
#7

here is the output
dads@dads-desktop:~$ sudo mkdir -p /usr/src/linux-headers-2.6.31-20/arch/mips/fw[sudo] password for dads:
mkdir: cannot create directory `/usr/src/linux-headers-2.6.31-20/arch/mips/fw': File exists
dads@dads-desktop:~$

regards
Rajinder

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

ok try:

sudo mkdir -p /usr/src/linux-headers-2.6.31-16/drivers/pci/pcie

Basically some folders are missing and when the package is removed, it expects the folder to exist and will moan if it's not, the -p option on mkdir tells the OS to make the parent folders of the desired folder if they do not exist.

Revision history for this message
Rajinder Sandhu (sandy744) said :
#9

thus far you are right but the folders exist only those files dont
here is the output
dads@dads-desktop:~$ sudo mkdir -p /usr/src/linux-headers-2.6.31-16/drivers/pci/pcie
[sudo] password for dads:
mkdir: cannot create directory `/usr/src/linux-headers-2.6.31-16/drivers/pci/pcie': File exists
dads@dads-desktop:~$

and ifor your information pcie is a png file and not a directory so things don't proceed further. and we are unable to create it due to problems not best known to me.
Regards
Rajinder.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

ok and:

mkdir -p /usr/src/linux-headers-2.6.31-16/drivers/pci/pcie/aer/Makefile

Then you should be good to go (just re-read the question)

Revision history for this message
Rajinder Sandhu (sandy744) said :
#11

I have deleted pcie file and created the new folder with mkdir so there is a dir as follows
usr/src/linux-headers-2.6.31-16/drivers/pci/pcie/aer/Makefile

But could not create
/usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile
As fw is a file which is not getting deleted...
so now even though one is created still there is problem in file 1 as well as file #2
here is the terminal output...
dads@dads-desktop:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-2.6.31-16 linux-headers-2.6.31-20
0 upgraded, 0 newly installed, 2 to remove and 142 not upgraded.
2 not fully installed or removed.
After this operation, 147MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 285626 files and directories currently installed.)
Removing linux-headers-2.6.31-16 ...
dpkg: warning: while removing linux-headers-2.6.31-16, directory '/usr/src/linux-headers-2.6.31-16/fs/ramfs/Makefile' not empty so not removed.
dpkg: warning: while removing linux-headers-2.6.31-16, directory '/usr/src/linux-headers-2.6.31-16/fs/ramfs' not empty so not removed.
dpkg: warning: while removing linux-headers-2.6.31-16, directory '/usr/src/linux-headers-2.6.31-16/fs' not empty so not removed.
dpkg: warning: while removing linux-headers-2.6.31-16, directory '/usr/src/linux-headers-2.6.31-16/drivers/video/via/Makefile' not empty so not removed.
dpkg: warning: while removing linux-headers-2.6.31-16, directory '/usr/src/linux-headers-2.6.31-16/drivers/video/via' not empty so not removed.
dpkg: warning: while removing linux-headers-2.6.31-16, directory '/usr/src/linux-headers-2.6.31-16/drivers/video' not empty so not removed.
dpkg: warning: while removing linux-headers-2.6.31-16, directory '/usr/src/linux-headers-2.6.31-16/drivers/pci' not empty so not removed.
dpkg: warning: while removing linux-headers-2.6.31-16, directory '/usr/src/linux-headers-2.6.31-16/drivers' not empty so not removed.
dpkg: warning: while removing linux-headers-2.6.31-16, directory '/usr/src/linux-headers-2.6.31-16' not empty so not removed.
Removing linux-headers-2.6.31-20 ...
dpkg: error processing linux-headers-2.6.31-20 (--remove):
 unable to securely remove '/usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile': Not a directory
Errors were encountered while processing:
 linux-headers-2.6.31-20
E: Sub-process /usr/bin/dpkg returned an error code (1)
dads@dads-desktop:~$

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#12

sudo mkdir -p /usr/src/linux-headers-2.6.31-16/fs/ramfs/Makefile

basically make all those folders it mentions, that's why I explained what was going on before, so you could fix it yourself some

Revision history for this message
Rajinder Sandhu (sandy744) said :
#13

you are right but fw file is not getting deleted as mentioned above ...here is the terminal output
one is cleared and other is still pending
ads@dads-desktop:~$ sudo mkdir -p /usr/src/linux-headers-2.6.31-16/fs/ramfs/Makefile
[sudo] password for dads:
dads@dads-desktop:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-2.6.31-20
0 upgraded, 0 newly installed, 1 to remove and 142 not upgraded.
1 not fully installed or removed.
After this operation, 73.3MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 274342 files and directories currently installed.)
Removing linux-headers-2.6.31-20 ...
dpkg: error processing linux-headers-2.6.31-20 (--remove):
 unable to securely remove '/usr/src/linux-headers-2.6.31-20/arch/mips/fw/sni/Makefile': Not a directory
Errors were encountered while processing:
 linux-headers-2.6.31-20
E: Sub-process /usr/bin/dpkg returned an error code (1)
dads@dads-desktop:~$
because fw is a file under mips folder and neither i am able to create nor delete this one....looking solution for this problem.
BTW Thanks for one problem we could clear.
Regards
Rajinder

Revision history for this message
Rajinder Sandhu (sandy744) said :
#14

Thanks Actionparsnip...
You gave me the idea and I could do it by moving the files to other location and then created the wanted files with the same path...
I did the installation of program before confirming you that problem is solved
Thanks
Rajinder

Revision history for this message
Rajinder Sandhu (sandy744) said :
#15

Thanks actionparsnip, that solved my question.