I had a similar problem while upgrading from Ubuntu Gnome 17.04 to 17.10 on Dell XPS 15(with GTX 1050 graphics card). The kernel version that I was trying to install was 4.13.0-25.
I successfully solved the problem by killing dpkg, switching to text-only console(Ctrl+Alt+F6), and running `sudo dpkg --configure -a`.
It seems like this problem is related to Nvidia driver.
I had a similar problem while upgrading from Ubuntu Gnome 17.04 to 17.10 on Dell XPS 15(with GTX 1050 graphics card). The kernel version that I was trying to install was 4.13.0-25.
I successfully solved the problem by killing dpkg, switching to text-only console( Ctrl+Alt+ F6), and running `sudo dpkg --configure -a`.
It seems like this problem is related to Nvidia driver.