Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3714  / 2 Years ago, sun, december 26, 2021, 11:32:48

I am trying to install vi and vim



I initially had vi instlled, and could not install vim, then I removed vi, and now I cannot install both.



I watch all threads in internet, that says you should update, uninstall or purge, then reinstall, but none are working.



Here are the logs:



[root@artik ~]# apt-get install vi.tiny
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vi.tiny
E: Couldn't find any package by glob 'vi.tiny'
E: Couldn't find any package by regex 'vi.tiny'



[root@artik ~]# apt-get 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:8.1.0788-0york0~16.04) but 2:8.1.0837-0york0~16.04 is to be installed
Depends: vim-runtime (= 2:8.1.0788-0york0~16.04) but 2:8.1.0837-0york0~16.04 is to be installed
E: Unable to correct problems, you have held broken packages.


now, file /etc/apt/sources.list



[root@artik ~]# cat /etc/apt/sources.list
deb http://ports.ubuntu.com/ubuntu-ports/ xenial main universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main universe
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main universe
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main universe
deb [arch=armhf] https://download.docker.com/linux/ubuntu xenial stable
# deb-src [arch=armhf] https://download.docker.com/linux/ubuntu xenial stable
deb http://archive.ubuntu.com/ubuntu xenial main universe
# deb-src http://archive.ubuntu.com/ubuntu xenial main universe


I am running ubuntu on Artik board



EDIT: Inside /etc/apt/sources.list.d/ I have:



[root@artik ~]# ls /etc/apt/sources.list.d/
artik-e2e-source.list
artik-e2e-source.list.save
artik-platform-artik533s-sources.list
artik-platform-artik533s-sources.list.save
jonathonf-ubuntu-vim-xenial.list
jonathonf-ubuntu-vim-xenial.list.save
nodesource.list
nodesource.list.save


and apt-cache



[root@artik ~]# apt-cache policy vim vim-common
vim:
Installed: (none)
Candidate: 2:8.1.0788-0york0~16.04
Version table:
2:8.1.0788-0york0~16.04 500
500 http://ppa.launchpad.net/jonathonf/vim/ubuntu xenial/main armhf Packages
2:7.4.1689-3ubuntu1.2 500
500 http://ports.ubuntu.com/ubuntu-ports xenial-security/main armhf Packages
500 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf Packages
2:7.4.1689-3ubuntu1 500
500 http://ports.ubuntu.com/ubuntu-ports xenial/main armhf Packages
vim-common:
Installed: (none)
Candidate: 2:8.1.0837-0york0~16.04
Version table:
2:8.1.0837-0york0~16.04 500
500 http://ppa.launchpad.net/jonathonf/vim/ubuntu xenial/main armhf Packages
100 /var/lib/dpkg/status
2:8.1.0788-0york0~16.04 500
500 http://ppa.launchpad.net/jonathonf/vim/ubuntu xenial/main armhf Packages
2:7.4.1689-3ubuntu1.2 500
500 http://ports.ubuntu.com/ubuntu-ports xenial-security/main armhf Packages
500 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf Packages
2:7.4.1689-3ubuntu1 500
500 http://ports.ubuntu.com/ubuntu-ports xenial/main armhf Packages


EDIT 2:



When I do apt-get update I get an error, I don't know if it is important:



Err:7 http://archive.ubuntu.com/ubuntu xenial/main armhf Packages
404 Not Found [IP: 91.189.88.162 80]

More From » apt

 Answers
7

It looks like you didn't run sudo apt-get update.



Additionally, this looks like you have installed a ppa. The ppa should be listed in a file located in /etc/apt/sources.list.d and will not be listed on /etc/apt/sources.list.



Run the following commands:



sudo apt-get update
sudo apt-get install --reinstall vim=2:8.1.0837-0york0~16.04


If this does not work, please let me know and we can investigate to see if you still have the ppa installed. If not, then you may want to reinstall the ppa. If you don't want the ppa, then you will need to clear your apt-cache and do some other stuff to remedy and I can give you further instructions on how to do that if that is needed.



Please post any errors. Thanks!






First, fix your sources.list file because it contains a line that should not be there by running the following command:



sudo sed -i 's/(deb http...archive)/#1/g' /etc/apt/sources.list
sudo apt-get update


If you have removed the ppa, run the following commands:



sudo apt-get clean
sudo apt-get update
sudo apt-get remove vim vim-common vim-runtime
sudo apt-get install vim vim-common vim-runtime


Please post any more errors. Thanks!


[#6187] Tuesday, December 28, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eving

Total Points: 162
Total Questions: 102
Total Answers: 112

Location: Trinidad and Tobago
Member since Thu, Dec 1, 2022
1 Year ago
;