Rollback mono 4.0.1 to 3.12.0 - linux

So, our mono was updated from 3.12.0 to 4.0.1 and caused a bunch of problems with nunit as seen here: New SIGABRT after upgrading to Mono 4 running NUnit tests While upgrading to 4.1.0 snapshot fixes these issues, it hasn't been officially released and we would not like to use it. Instead we'd like to downgrade back to 3.12.0 but it seems that I can't even do that. Running apt-cache showpkg mono-complete gives me only the following options
matt#matt-T420:~/vw3$ apt-cache showpkg mono-complete
Package: mono-complete
Versions:
4.0.1-0xamarin4 (/var/lib/apt/lists/download.mono-project.com_repo_debian_dists_wheezy_main_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_binary-amd64_Packages
MD5: dacc30c6a4347277b44c68a99c998d5f
Description Language: en
File: /var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_i18n_Translation-en
MD5: dacc30c6a4347277b44c68a99c998d5f
3.2.8+dfsg-4ubuntu4 (/var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_binary-amd64_Packages
MD5: dacc30c6a4347277b44c68a99c998d5f
Description Language: en
File: /var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_i18n_Translation-en
MD5: dacc30c6a4347277b44c68a99c998d5f
However if I browse to http://origin-download.mono-project.com/repo/debian/dists/wheezy/snapshots/3.12.0/ I can see the package but I'm not sure how to add it to my list of repos. I don't know how to modify echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list to pint to that 3.12.0 folder.
I basically just want to blow away mono-4.0, reinstall 3.12.0 and then pin/hold it at that version. Can someone please help?

First remove mono 4.0.1
sudo apt-get remove mono-complete
sudo apt-get purge mono-complete
sudo apt-get autoremove
After a few attempts, I have modified my repo like this, which seems to have worked:
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.12.0 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
then ran:
sudo apt-get update
sudo apt-get install mono-complete
mono --version
I am now running 3.12

Downgrading packages with apt is a bit of a pain.
you'll basically need to "apt-get install libfoo=3.12.1-0xamarin4" with every upgraded lib on the same command line.
Source: https://twitter.com/directhex/status/596382226121674752 (from the creator of the Mono packages)
You can add the snapshot of old packages repo by following http://www.mono-project.com/docs/getting-started/install/linux/#accessing-older-releases

Related

Deepin 20 and updated Nodejs

Does anyone have a solution to get current node / npm versions on Deepin 20?
When trying to install from nodesource I get this:
Confirming "n/a" is supported...
curl -sLf -o /dev/null 'https://deb.nodesource.com/node_14.x/dists/n/a/Release'
Your distribution, identified as "n/a", is not currently supported,
please contact NodeSource at
https://github.com/nodesource/distributions/issues if you think this
is incorrect or would like your distribution to be considered for
support
Although Deepin 20.2 can install Node JS directly from the apt, the version is too old and not maintained anymore.
In addition, the official installation method of NodeJS is problematic as it does not support the Deepin system.
So you need to look at this script setup.14.x to find the actual installation method. Of course, it might be simpler if you already have it installed on Debian or Ubuntu.
You have to completely uninstall Deepin's own version before installing the official version.
sudo apt remove nodejs npm
sudo apt autoremove
Add the following content to
/etc/apt/sources.list.d/nodesource.list:
deb https://deb.nodesource.com/node_14.x buster main
# deb-src https://deb.nodesource.com/node_14.x buster main
Then add the official key and you can install it directly.
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
sudo apt update
sudo apt install nodejs
Problem fixed with Experience.
Deepin isn't listed as a supported distro for NodeSource.
As a Debian derivative, something like this should work:
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
Otherwise you might try a manual install. If you do, you'll need to specify the buster codename since Deepin 20 is based on Debian 10.5.
This is what worked for me to install NodeJS 12. Paste in terminal the following
VERSION=node_12.x
DISTRO="$(dpkg --status tzdata|grep Provides|cut -f2 -d'-')"
echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs
this should work for Deepin 20

How to reinstall the latest cmake version?

I would like to install cmake the latest version, on Linux environment. I have cmake version 3.5 installed and is not supported by some applications. I tried to upgrade it by uninstalling the current version. But when I reinstall with sudo apt-get install cmake, I get the same version 3.5 re-installed. How do I install the latest version with sudo apt-get install ....?
As far as I know the best way to get the latest CMake version installed on any Linux is not by apt but using pip.
Remove the apt cmake and install the latest version from pip which can easily keep up-to-date.
apt remove cmake -y
pip install cmake --upgrade
Edit: As GNUton has pointed out, the following only works on Ubuntu 16.04 and 18.04(Checked on June 2019).
Now CMake developer team in Kitware Inc provides APT repositiory. It allows you to install latest CMake via apt-get.
If you are using a minimal Ubuntu image or a Docker image, you may need to install the following packages:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates gnupg \
software-properties-common wget
Obtain a copy of our signing key:
wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc |
sudo apt-key add -
Add the repository to your sources list and update.
For Ubuntu Bionic Beaver (18.04):
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get update
For Ubuntu Xenial Xerus (16.04):
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main'
sudo apt-get update
... Optional steps. See details in reference.
... Optional steps. See details in reference.
Now call
sudo apt-get install cmake
Reference: Kitware APT Repository.
You can try the following steps that have worked for me on Ubuntu 18.04.3 LTS as OS of the NVIDIA jetson Nano to get the last version of cmake "cmake-3.14.0" from https://cmake.org/download/.
Delete the installed version in your system
sudo apt purge cmake
Download cmake3.13.4 source
wget https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4.tar.gz
Extract files
tar zxvf cmake-3.13.4.tar.gz
Execute the following commands in this order to build it
cd cmake-3.13.4
sudo ./bootstrap
sudo make
sudo make install
Verify the version is installed correctly
cmake --version
Following the comments made on how to Install the latest CMake version and to post the answer for this question:
Ans:
This depends with Ubuntu OS version currently installed on your PC or Mac. If you have the following Ubuntu OS version then you have this CMake installed or that you could install and reinstall with "sudo apt-get install cmake". Even if you uninstall your version and try to reinstall later version.
Ubuntu 16.04 ships with cmake-3.5.1
Ubuntu 17.10 ships with cmake-3.9.1
Ubuntu 18.04 ships with cmake-3.10.2
Ubuntu 20.04 ships with cmake-3.16.3
Ubuntu 21.04 ships with cmake-3.18.4
Now if you have Ubuntu 16.04 installed and you want cmake-3.10, there is OS problem since you can only install and reinstalled cmake-3.5.1. To get cmake-3.10 or any other version, you have to download and install the package from https://packages.ubuntu.com/. Once you find the latest version of cmake .targz files, you have to build it yourself from the command line.
For CentOS/RHEL you can help these following steps:
yum -y install python-pip
pip install cmake --upgrade
If you are using Google Colab like me and wanted a higher version of cmake in it. Then do the following,
!pip uninstall cmake
!pip install cmake
This will install cmake 3.22 instead of the default version 3.12
pip install cmake --upgrade
if the following occurs after cmake .. :
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/.../.../...
CMake Error: Error executing cmake::LoadCache(). Aborting.
then try
hash -r
the following worked for me:
sudo apt remove cmake
pip install cmake --upgrade
then, I exited the terminal and again entered to check the version with cmake --version command
3.20.5 in ubuntu 16.04
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main'
sudo apt update
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DE19EB17684BA42D
sudo apt install cmake cmake-qt-gui cmake-curses-gui
yum remove cmake
wget https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4.tar.gz
tar zxvf cmake-3.13.4.tar.gz
cd cmake-3.13.4
sudo ./bootstrap --prefix=/usr/local
sudo make
sudo make install
vi ~/.bash_profile
...
# PATH=$PATH:$HOME/bin
PATH=/usr/local/bin:$PATH:$HOME/bin
export PATH
source ~/.bash_profile
cmake --version
vi ~/.bash_profile
centos7 it help me
In case someone still finds it hard to remove cmake from their machine.
This command works for me (requires sudo permissions):
$ sudo find / -name "cmake" | xargs -I % sudo rm -rf "%"

Installing mono on lubuntu - code package needs to be reinstalled

I am fairly new to ubuntu and I've installed lubuntu 17.04 since I needed a lightweight OS for an old laptop I have.
Since I need to develop some c# apps I knew that I couldn't install VS Community on ubuntu but there had to be some alternatives and after some research I found about mono.
Going to the downoad page on mono website http://www.mono-project.com/download/#download-lin I've found the procedure I had to do to install mono so I've followed it step-by-step:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt-get update
sudo apt-get install mono-devel
sudo apt-get install mono-complete
sudo apt-get install mono-dbg
after I've done that last step I was asked to fix the installation by doing: apt --fix-broken install
And after that I proceeded to install the rest of the packages as referred on the website:sudo apt-get install referenceassemblies-pcl
and I got the following error: dpkg was interrupted, to correct the problem run sudo dpkg --configure -a
After trying to reinstall that last package I get the following message:
The package code needs to be reinstalled but a repository couldn't be found
After some research I couldn't find anything related to that package and I tried to perform the above steps again but I got the same result.
Where can I find that package or what do I need to do to resume the installation of mono?
Thanks in advance
PS: I'm sorry if the errors aren't 100% as they appear in the console because my distro in portuguese and I've translated the messages the best I knew.

How to install older arangodb version on ubuntu

I am trying to install 2.6.0 (our solution was built upon it). I am getting error that arangodb doesn't have 2.6.0
wget https://www.arangodb.com/repositories/arangodb2/xUbuntu_14.04/Release.key
apt-key add - < Release.key
echo 'deb https://www.arangodb.com/repositories/arangodb2/xUbuntu_14.04/ /' | sudo tee /etc/apt/sources.list.d/arangodb.list
sudo apt-get install apt-transport-https
sudo apt-get install arangodb=2.6.0
Could you please guide me what is the correct way.
Only the listed version on following link can be installed. https://www.arangodb.com/repositories/archive/ArangoDB_2/linux/xUbuntu_14.04/Sources

Using 'sudo apt-get install build-essentials'

I was trying to use sudo apt-get install build-essentials to install the g++ compiler on my Ubuntu Linux box. But it gave me the following message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package build-essentials
How do I fix this problem?
Drop the 's' off of the package name.
You want sudo apt-get install build-essential
You may also need to run sudo apt-get update to make sure that your package index is up to date.
For anyone wondering why this package may be needed as part of another install, it contains the essential tools for building most other packages from source (C/C++ compiler, libc, and make).
In my case, simply "dropping the s" was not the problem (although it is of course a step in the right direction to use the correct package name).
I had to first update the package manager indexes like this:
sudo apt-get update
Then after that the installation worked fine:
sudo apt-get install build-essential
Try
sudo apt-get update
sudo apt-get install build-essential
(If I recall correctly the package name is without the extra s at the end).
I know this has been answered, but I had the same question and this is what I needed to do to resolve it. During installation, I had not added a network mirror, so I had to add information about where a repo was on the internet. To do this, I ran:
sudo vi /etc/apt/sources.list
and added the following lines:
deb http://ftp.debian.org/debian wheezy main
deb-src http://ftp.debian.org/debian wheezy main
If you need to do this, you may need to replace "wheezy" with the version of debian you're running. Afterwards, run:
sudo apt-get update
sudo apt-get install build-essential
Hopefully this will help someone who had the same problem that I did.
The package is called build-essential without the plural "s". So
sudo apt-get install build-essential
should do what you want.
Try 'build-essential' instead.
To auto-generate the "source.list" file I suggest to use:
https://debgen.simplylinux.ch/
Where you can select the country, the distribution, ..etc
After that, all you need to do is to replace (take a backup of the file first) your original source.list file with the generated one and do as mentioned in other answers:
sudo apt-get update
sudo apt-get install build-essential
Manifest for installing rust and build-essentials on ubuntu 20.04.03
rustup self uninstall
apt-get update
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe"
apt-get -u dist-upgrade
apt install aptitude
sudo aptitude install libc6=2.31-0ubuntu9
sudo aptitude install build-essential
apt-get update
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
rustup toolchain install nightly --allow-downgrade --profile minimal --component clippy
rustup default stable
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
sudo apt install -y cmake pkg-config libssl-dev git gcc build-essential clang libclang-dev
rustc --version
source $HOME/.cargo/env
#No tested on me Fast Installation: Install all the required dependencies with a single command. (Be patient, this can take up to
30 minutes)
curl https://getsubstrate.io -sSf | bash -s -- --fast
Finally step test:
https://doc.rust-lang.org/cargo/getting-started/first-steps.html
#ArmanRiazi.Blockchain#Substrate#Dr.GavinWood

Resources