Unable to locate mono packages in Ubuntu 14.04
Solution 1
All works great. I assume, you forgot
sudo apt-get update
or simply start all steps again:
sudo rm /etc/apt/sources.list.d/mono-xamarin*
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
% apt-cache policy referenceassemblies-pcl
referenceassemblies-pcl:
Installed: 2014.04.14-1
Candidate: 2014.04.14-1
Version table:
*** 2014.04.14-1 0
500 http://download.mono-project.com/repo/debian/ wheezy/main i386 Packages
100 /var/lib/dpkg/status
% apt-cache policy mono-complete
mono-complete:
Installed: 4.0.2.5-0xamarin1
Candidate: 4.0.2.5-0xamarin1
Version table:
*** 4.0.2.5-0xamarin1 0
500 http://download.mono-project.com/repo/debian/ wheezy/main i386 Packages
100 /var/lib/dpkg/status
3.2.8+dfsg-4ubuntu4 0
500 http://de.archive.ubuntu.com/ubuntu/ vivid/universe i386 Packages
% apt-cache policy mono-complete
mono-complete:
Installed: 4.0.2.5-0xamarin1
Candidate: 4.0.2.5-0xamarin1
Version table:
*** 4.0.2.5-0xamarin1 0
500 http://download.mono-project.com/repo/debian/ wheezy/main i386 Packages
100 /var/lib/dpkg/status
3.2.8+dfsg-4ubuntu4 0
500 http://de.archive.ubuntu.com/ubuntu/ vivid/universe i386 Packages
% apt-cache policy ca-certificates-mono
ca-certificates-mono:
Installed: 4.0.2.5-0xamarin1
Candidate: 4.0.2.5-0xamarin1
Version table:
*** 4.0.2.5-0xamarin1 0
500 http://download.mono-project.com/repo/debian/ wheezy/main i386 Packages
100 /var/lib/dpkg/status
Solution 2
Have you tryed this:
sudo apt-add-repository ppa:referenceassemblies-pci/ppa
sudo apt-get update
sudo apt-get -y install referenceassemblies-pci
and it might work fine this way.
Solution 3
The echo
command to write to /etc/apt/sources.list.d/mono-xamarin.list
might not work in your case. I had similar error when piping commands to a docker image - reported here (https://github.com/docker/docker/issues/8679).
In that case the solution to pipe to docker instead:
echo "deb http://download.mono-project.com/repo/debian wheezy main" | docker exec -i --user=root MyContainer tee /etc/apt/sources.list.d/mono-xamarin.list
If this is not the case, you could perhaps just write the file with the missing line in other ways.
Solution 4
I've got the same problem as what you say. But I found the reason at last: I shouldn't use the ctrl+c and ctrl+v to run the three commands at a time:
1.sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
2.echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
3.sudo apt-get update
In this way,there are actually only first command is excuted. So I run there command one by one,and the problem solved.
Related videos on Youtube
xameeramir
Updated on September 18, 2022Comments
-
xameeramir over 1 year
After updating Linux with:
sudo apt-get update
I'm trying to install referenceassemblies-pcl and ca-certificates-mono as per this article respectively using the below commands:
sudo apt-get install referenceassemblies-pcl sudo apt-get install ca-certificates-mono
The command looks correct, as per ziyasal's answer but I'm getting these errors:
unable to locate package referenceassemblies-pcl
unable to locate package ca-certificates-mono
The outputs of
apt-cache policy ca-certificates-mono apt-cache policy referenceassemblies-pcl
respectively are
Unable to locate package ca-certificates-mono
Unable to locate package referenceassemblies-pcl
The output of
sudo apt-add-repository ppa:referenceassemblies-pci/ppa
is:Cannot add PPA: 'ppa:referenceassemblies-pci/ppa'.
Please check that the PPA name or format is correct.
The output of
cat /etc/apt/sources.list.d/mono-xamarin.list
cat: /etc/apt/sources.list.d/mono-xamarin.list: No such file or directory
Quesion: What am I doing wrong here?
-
A.B. almost 9 yearsEdit you question and add the output of
apt-cache policy ca-certificates-mono
andapt-cache policy referenceassemblies-pcl
-
A.B. almost 9 yearsAdd the output of
cat /etc/apt/sources.list.d/mono-xamarin.list
-
xameeramir almost 9 yearscat: /etc/apt/sources.list.d/mono-xamarin.list: No such file or directory
-
A.B. almost 9 yearsOK. I assume, that are also no other
*xamarin*
files in this folder. Follow the steps in my answer exactly and post the error messages.
-
-
xameeramir almost 9 yearsI believe I did it. The article asked to update. Let me again give it a try.
-
xameeramir almost 9 yearsCannot add PPA: 'ppa:referenceassemblies-pci/Ubuntu'. Please check that the PPA name or format is correct.
-
Fabby almost 9 years@BountyMan: If you like the answer, just click the little grey ☑ under the "0" now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the 0, and if you really like the answer, click on the little grey checkmark and the little up-arrow... If you have any further questions, go to askubuntu.com/questions/ask
-
xameeramir almost 9 years@Fabby - +1 for all answers
-
Fabby almost 9 years@BountyMan :D I'm not the poster, but anyway: you know the drill from StackOverflow: if it works, accept... ;-)
-
xameeramir almost 9 years@Fabby - It's not working mann. I am pulling my hair because I have already done this before in the same machine. I uninstalled and reinstalled everything but why it is not happening now is my problem
-
A.B. almost 9 years@BountyMan
ppa:referenceassemblies-pci/ppa
and notppa:referenceassemblies-pci/Ubuntu
-
Admin over 8 yearsFor clueless users: Despite the URL is specifying
/debian wheezy
, it is valid for Debian, Ubuntu and derivatives according to this documentation. -
xameeramir over 8 years@clearkimura and Keld - I have stopped working on linux from a while. Thanks for your suggestion.
-
xameeramir almost 8 yearsAlthough my problem is solved already, Thank you for your efforts. :)