Problem solved..by changing the source for 16.04 to the one for 18.04.
I have met some dependency problems when trying to install applications with apt:
$ sudo apt install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
vim : Depends: vim-common (= 2:7.4.1689-3ubuntu1.2) but 2:8.0.1453-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
When I tried to install aptitude and then install vim by aptitude, to solve the dependency problem, it told me that apt would be removed:
$ sudo apt-get install aptitude
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aptitude-common libboost-iostreams1.58.0 libcwidget3v5 libsigc++-2.0-0v5
libxapian22v5
Suggested packages:
apt-xapian-index aptitude-doc-en | aptitude-doc debtags tasksel
libcwidget-dev xapian-tools
The following packages will be REMOVED:
apt apt-utils ubuntu-desktop ubuntu-minimal ubuntu-release-upgrader-gtk
update-manager update-notifier update-notifier-common
The following NEW packages will be installed:
aptitude aptitude-common libboost-iostreams1.58.0 libcwidget3v5
libsigc++-2.0-0v5 libxapian22v5
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt
0 upgraded, 6 newly installed, 8 to remove and 13 not upgraded.
Need to get 2,974 kB of archives.
After this operation, 4,842 kB of additional disk space will be used.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?] ^C
Then when I tried to install vim via aptitude, it showed the error that it couldn't find some folder of apt...
I have asked my roommate and he said apt and aptitude don't conflict with each other! So is it true that I can install aptitude without removing apt? and how?
Updated after running apt -f install
:
cky@cky:~$ sudo apt update
Hit:1 https://mirrors.ustc.edu.cn/ubuntu xenial InRelease
Hit:2 https://mirrors.ustc.edu.cn/ubuntu xenial-security InRelease
Hit:3 https://mirrors.ustc.edu.cn/ubuntu xenial-updates InRelease
Hit:4 https://mirrors.ustc.edu.cn/ubuntu xenial-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
13 packages can be upgraded. Run 'apt list --upgradable' to see them.
cky@cky:~$ sudo apt -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
But it dosen't help much, the problem is still the same as before. The sources.list has been changed to a faster one, can that has something to do with the problem?
Here's the sources.list
cky@cky:~$ sudo cat /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
## Not recommended
# deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
cky@cky:~$ sudo cat /etc/apt/sources.list.d/*
cat: '/etc/apt/sources.list.d/*': No such file or directory
It's too slow using the default source xD I'm trying other possible sources
19% [21 Packages 269 kB/1,019 kB 26%] 15.3 kB/s 45min 35s
/etc/apt/sources*
- do not mix repositories from different releases of Ubuntu. If you don't know how to fix your sources, then please edit your question to include the complete output ofcat /etc/apt/sources.list /etc/apt/sources.list.d/*
– user535733 Oct 08 '18 at 10:53