LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2017, 03:22 AM   #1
Ves
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Rep: Reputation: Disabled
Having issues with apt-get upgrade


Code:
root@DESKTOP-88LREVS:~# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 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 initramfs-tools (0.130) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.9.0-kali4-amd64 (4.9.30-1kali1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.9.0-kali4-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali4-amd64 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.9.0-kali4-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
 linux-image-amd64 depends on linux-image-4.9.0-kali4-amd64; however:
  Package linux-image-4.9.0-kali4-amd64 is not configured yet.

dpkg: error processing package linux-image-amd64 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.9.0-kali3-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali3-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-4.9.0-kali4-amd64
 linux-image-amd64
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
can someone help me please.
 
Old 06-16-2017, 03:34 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861
Can you please paste the output from the following:

Code:
dpkg -l | grep -v '^.i'

uname -a
 
Old 06-16-2017, 04:02 AM   #3
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,119

Rep: Reputation: Disabled
Try, (after running apt-get update)
Code:
sudo apt-get -fix install
 
Old 06-16-2017, 04:09 AM   #4
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by fatmac View Post
Try, (after running apt-get update)
Code:
sudo apt-get -fix install
It is not apt-get -fix install, it is either apt-get -f install, or apt-get --fix-broken install.
 
Old 06-16-2017, 10:06 AM   #5
Ves
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Can you please paste the output from the following:

Code:
dpkg -l | grep -v '^.i'

uname -a
Code:
root@DESKTOP-88LREVS:~# dpkg -l | grep -v '^.i'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                      Version                              Architecture Description
+++-=========================================-====================================-============-===========================================================================================================================================
iF  initramfs-tools                           0.130                                all          generic modular initramfs generator (automation)
iF  linux-image-4.9.0-kali4-amd64             4.9.30-1kali1                        amd64        Linux 4.9 for 64-bit PCs
iU  linux-image-amd64                         4.9+80+kali1                         amd64        Linux for 64-bit PCs (meta-package)
rc  live-tools                                1:20151214+nmu1                      all          Live System Extra Components
rc  python-alembic                            0.8.8-2                              all          lightweight database migration tool for SQLAlchemy - Python 2.x
rc  python-pastescript                        1.7.5-4                              all          serving web applications, creating file layouts for Python packages
rc  resolvconf                                1.79                                 all          name server information handler
rc  user-setup                                1.67                                 all          Set up initial user and password
root@DESKTOP-88LREVS:~# 
root@DESKTOP-88LREVS:~# uname -a
Linux DESKTOP-88LREVS 4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux
 
Old 06-16-2017, 12:14 PM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861
Ok, thanks. So the first two packages in the list have only been half-configured, the third unpacked but not configured. They are connected to a new version of kernel. Did you notice any problems when you last updated your software, or was the power cut during the process? The five packages marked "rc" (residual configuration) are ones that have been removed but not purged - they can be removed by running sudo apt-get purge packagename, although I have to ask why you deleted resolvconf in the first place as it can be important.

You can either try running sudo apt-get -f install, as suggested above, or take a more manual approach and start with trying sudo apt-get --reinstall install initramfs-tools.

Last edited by hydrurga; 06-16-2017 at 01:35 PM.
 
Old 06-16-2017, 12:33 PM   #7
Ves
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Ok, thanks. So the first two packages in the list have only been half-configured, the third unpacked but not configured. They are connected to a new version of kernel. Did you notice any problems when you last updated your software, or was the power cut during the process? The five packages marked "rc" (residual configuration) are ones that have been removed but not purged - they can be removed by running sudo apt-get autoremove, although I have to ask why you deleted resolvconf in the first place as it can be important.

You can either try running sudo apt-get -f install, as suggested above, or take a more manual approach and start with trying sudo apt-get --reinstall install initramfs-tools.
sudo apt-get autoremove:
Code:
root@DESKTOP-88LREVS:~# sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.130) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.9.0-kali4-amd64 (4.9.30-1kali1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.9.0-kali4-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali4-amd64 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.9.0-kali4-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
 linux-image-amd64 depends on linux-image-4.9.0-kali4-amd64; however:
  Package linux-image-4.9.0-kali4-amd64 is not configured yet.

dpkg: error processing package linux-image-amd64 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.9.0-kali3-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali3-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-4.9.0-kali4-amd64
 linux-image-amd64
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't really remember deleting it.

sudo apt-get -f install:
Code:
root@DESKTOP-88LREVS:~# sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.130) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.9.0-kali4-amd64 (4.9.30-1kali1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.9.0-kali4-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali4-amd64 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.9.0-kali4-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
 linux-image-amd64 depends on linux-image-4.9.0-kali4-amd64; however:
  Package linux-image-4.9.0-kali4-amd64 is not configured yet.

dpkg: error processing package linux-image-amd64 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.9.0-kali3-amd64
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.9.0-kali3-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-4.9.0-kali4-amd64
 linux-image-amd64
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get --reinstall install initramfs-tools:
Code:
root@DESKTOP-88LREVS:~# sudo apt-get --reinstall install initramfs-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for initramfs-tools:amd64
 
Old 06-16-2017, 12:57 PM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861
Quote:
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
Can you check that the directory /var/tmp exists? Can you also check that you have sufficient space left in each of your mounted partitions.
 
Old 06-16-2017, 01:08 PM   #9
Ves
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Can you check that the directory /var/tmp exists? Can you also check that you have sufficient space left in each of your mounted partitions.
Code:
root@DESKTOP-88LREVS:~# /var/tmp
-bash: /var/tmp: No such file or directory
yes I have enough in each mounted partitions
 
Old 06-16-2017, 01:22 PM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861
Quote:
Originally Posted by Ves View Post
Code:
root@DESKTOP-88LREVS:~# /var/tmp
-bash: /var/tmp: No such file or directory
That's the basic problem (although you illustrated it by trying to run the directory rather than use the ls command). Did you delete that directory at any point?

I'm not sure how Kali works specifically in this case, but you should create that directory with the following ownership and permissions (note the sticky bit):

Code:
drwxrwxrwt 19 root root 4096 Jun 16 13:11 /var/tmp

Last edited by hydrurga; 06-16-2017 at 01:24 PM.
 
Old 06-16-2017, 01:37 PM   #11
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861
Oops, my original suggestion to use autoremove to remove the residual configurations was completely wrong and a sign of stupidity on my side (the problem with trying to do 3 things at once) - apologies. I've amended my original post accordingly.

You remove the residual configurations by sudo apt-get purge packagename, although in this case wait first until the main problem is resolved.
 
Old 06-16-2017, 01:42 PM   #12
Ves
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
That's the basic problem (although you illustrated it by trying to run the directory rather than use the ls command). Did you delete that directory at any point?

I'm not sure how Kali works specifically in this case, but you should create that directory with the following ownership and permissions (note the sticky bit):

Code:
drwxrwxrwt 19 root root 4096 Jun 16 13:11 /var/tmp
no i did not delete the ls directory.
Code:
root@DESKTOP-88LREVS:~# drwxrwxrwt 19 root root 4096 Jun 16 13:11 /var/tmp
-bash: drwxrwxrwt: command not found
Can you elaborate a little on what I should do?
 
Old 06-16-2017, 01:55 PM   #13
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861
Ves, I hope that it doesn't sound too off, particularly given my slip of the mind with autoremove , but Kali Linux is not a distro for beginners to Linux. If you don't know how to do things like list a directory and create a directory then you're only going to endure pain using Kali.

Don't worry, you're far from being the only one. There has been an influx of late on Linux Questions of new Linux users using Kali, and struggling to do so. Some on here have attributed to it to a US television show that features the distro?

Can I suggest that you use a more newbie-friendly distro to start off with, say Mint or Ubuntu, and cut your teeth on that. It shouldn't take you too long, and once you've learned the basics, you can then move on to more complicated setups such as Kali.

The answer to your question, by the way, is mkdir and chmod. If you run man mkdir, then this shows you the different options you can use for mkdir - the same applies to using man command for most other commands.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt error after upgrade and 'apt-get -f install' does not sort it out zimgir Ubuntu 1 01-12-2012 10:09 PM
Howabout apt-get update ; apt-get upgrade -f -y --force-yes in the crontab every week frenchn00b Debian 1 04-05-2008 07:47 AM
apt-get upgrade error (stops at kernel due to "dependency issues") n0dl Debian 2 02-16-2007 06:20 PM
Apt-get upgrade issues with mysql fishegg Debian 6 10-12-2006 11:31 PM
What's the difference between apt-get upgrade and apt-get dist-upgrade? davidas Linux - Newbie 4 04-04-2004 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:25 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration