Cannot install dotnet-sdk2.1 on Ubuntu 16.04 server - .net-core

I was trying to install dotnet-sdk2.1.101 on my Ubuntu 16.04 server today but following error occured:
"dotnet-sdk-2.1.101 : Depends: aspnetcore-store-2.0.6 but it but it is not going to be installed"
Steps taken: (followed instructions on microsoft website):
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1
Any help is much appreciated :)

Following a guide on Upgrading to dotnet core 2.1.4 on Ubuntu 16.04 resolved this issue on my end:
First, Setup the package manager.
$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
$ sudo apt-get update
Next, Install .NET Core 2.x
$ sudo apt-get install dotnet-sdk-2.1.4

I have fixed my own issue following these below steps:
wget -q packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update –y
sudo apt-get install dotnet-sdk-2.1.101

For me previous didn't help.
But for me worked the next:
wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u2_amd64.deb
sudo dpkg -i libicu57_57.1-6+deb9u2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu60_60.2-6ubuntu1_amd64.deb
sudo dpkg -i libicu60_60.2-6ubuntu1_amd64.deb
sudo apt-get install dotnet-sdk-2.1
I don't quite understand did I need 2 versions of libicu, but after 1st it required the 2nd one.

Related

Apt-get is broken after install Google Cloud SDK on Ubuntu 18.04 LTS

I was installing the Google Cloud SDK on my Ubuntu VM using the following commands
# Add the Cloud SDK distribution URI as a package source
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud Platform public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
# Update the package list and install the Cloud SDK
sudo apt-get update && sudo apt-get install google-cloud-sdk
and I think its broken now.
apt-get install unixODBC unixODBC-dev
E: Conflicting values set for option Signed-By regarding source https://packages.cloud.google.com/apt/ cloud-sdk: /usr/share/keyrings/cloud.google.gpg !=
E: The list of sources could not be read.
E: Conflicting values set for option Signed-By regarding source https://packages.cloud.google.com/apt/ cloud-sdk: /usr/share/keyrings/cloud.google.gpg !=
E: The list of sources could not be read.
Is there anyway to fix it so I can continue to download packages.
I got into a very similar situation today by not following the installation instructions carefully enough. What I think happened is that I accidentally pasted and executed some of the commands that were only supposed to be run if you had trouble with any of the previous steps.(The ones having "Troubleshooting Tip" above them.)
It looks like I "solved" it now by by removing these files
sudo rm /usr/share/keyrings/cloud.google.gpg
sudo rm /usr/share/keyrings/cloud.google.gpg~
sudo rm /etc/apt/sources.list.d/google-cloud-sdk.list
and then following the installation instruction again (more carefully this time) to install Google Cloud SDK.
Remove the existing sdk by running single command:
sudo rm /usr/share/keyrings/cloud.google.gpg && sudo rm /usr/share/keyrings/cloud.google.gpg~ && sudo rm /etc/apt/sources.list.d/google-cloud-sdk.list
Install google cloud sdk by running the single command
sudo apt-get install apt-transport-https ca-certificates gnupg && echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && sudo apt-get update && sudo apt-get install google-cloud-sdk && sudo apt-get install google-cloud-sdk-app-engine-java && sudo apt-get install google-cloud-sdk-app-engine-python && gcloud init
Hope this issue will be fixed.
I followed all these commands (for trying to reproduce error in system)
1st command
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
2nd command
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
3rd command
sudo apt-get update && sudo apt-get install google-cloud-sdk
4th command
sudo apt-get install unixODBC unixODBC-dev
above command prompted
E: Unable to locate package unixODBC
E: Unable to locate package unixODBC-dev
Then I installed all the gCloud sdk dependencies By below command
5th command
sudo apt-get install google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-python google-cloud-sdk-pubsub-emulator google-cloud-sdk-bigtable-emulator google-cloud-sdk-datastore-emulator kubectl
All above commands are given by you except 5th one,
I am unable to reproduce that error in my machine,
But it seems Your apt needs to clean up signed certificats and reconfigure again..
refer below link it might help you.
https://www.fossmint.com/keep-ubuntu-system-clean/
and please let me know about the solution if you got..
feel free to discuss on the same.
In case of no such files found, you can remove related link in sources.list or sources.list.save. It worked for me.
I had the same issue, here is how I fixed it
Step 1: Remove sudo rm google-cloud-sdk.list
cd /etc/apt/sources.list.d
sudo rm google-cloud-sdk.list
Step 2: Reinstall Google Cloud again
sudo snap remove google-cloud-sdk # skip if you had installed gcp sdk before
sudo apt-get install apt-transport-https ca-certificates gnupg -y
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
sudo curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk
gcloud init
Ref: https://askubuntu.com/a/1389272
This one solved it for me:
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/cloud.google.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee /etc/apt/sources.list.d/google-cloud-sdk.list > /dev/null

How to install apt-get package in Amazon Linux machine

How to install apt-get in amazon linux machine,using yum or wget ,i searched extensively but didnt find relvant ..getting below message
[ec2-user#ip-172-31-33-94 ~]$ sudo apt-get update -y && sudo apt-get install -y
linux-image-extra-$(uname -r)
sudo: apt-get: command not found
well figured out these commands hence answering,these commands will install apt-get and run docker as ec2 user
sudo yum update -y
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
docker info
docker run -it --rm tarunkumard/gatling:FirstScript

How to install Swoole in ubuntu

Simply my Question is How to Install Swoole in Ubuntu 14.04 LTS
I have tried
sudo pecl install swoole
am getting handfull of errors, already posted here
Is there any alternate way to install the same...
Swoole Installation alternate ways
1.Install from source
sudo apt-get install php7-dev
git clone https://github.com/swoole/swoole-src.git
cd swoole-src
phpize
./configure
make && make install
2.Example for static compile
git clone -b PHP-7.2 --depth 1 https://github.com/php/php-src.git
cd php-src/
git clone -b master --depth 1 https://github.com/swoole/swoole-src.git ext/swoole
./buildconf --force
./configure --prefix=/usr/local/php7 --disable-all --enable-cli --disable-cgi --disable-fpm --disable-phpdbg --enable-bcmath --enable-hash --enable-json --enable-mbstring --enable-mbregex --enable-mbregex-backtrack --enable-sockets --enable-pdo --with-sodium --with-password-argon2 --with-sqlite3 --with-pdo-sqlite --with-pcre-regex --with-zlib --with-openssl-dir --enable-swoole-static --enable-openssl --with-swoole
time make -j `cat /proc/cpuinfo | grep processor | wc -l`
sudo make install
Some Linux distributions do not include the PHP-XML extension in their PHP package and will need to be enabled before using PECL. You can install using apt-get install php-xml and you may need to install PHPize to compile Swoole, you can install it using apt-get install php7.*-dev or whatever PHP version you are using.
Then try again with sudo pecl install swoole
For those who installed PHP from ondrej/php PPA (quite common way to install PHP in Ubuntu) it's quite easy now:
sudo apt install php-swoole
Or for specific version:
sudo apt install php7.4-swoole
Tip. This is how you usually install ondrej/php PPA:
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Install swoole for version specific should work for example if you have php 7.3 use
sudo apt install php7.3-swoole
replace the version to your local php env

Installing R and RStudio on Chromebook Samsung 3

I have been trying to but struggling to install R and RStudio on my Chromebook Samsung 3. I have it set-up with Crouton with XFCE/Xiwi and use Trusty. I can install R just fine but either can't install Rstudio at all or can get the icon for Rstudio to show up but nothing happens when I click on it. Can someone give me a process on how to install these effectively on my device?
UPDATE 2020:
I am no longer using Crouton, but rather the built in Linux option (Crostini). In the Linux terminal, I did the following:
sudo apt-get update; sudo apt-get upgrade; sudo apt-get update --fix-missing; sudo apt autoclean; sudo apt-get clean; sudo apt-get autoremove
sudo apt install -y gnupg2
sudo apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
sudo vi /etc/apt/sources.list
Add this line. Can use a different mirror if desired. (Note: older versions of Crostini were running Stretch by default instead of Buster)
deb http://cran.rstudio.com/bin/linux/debian buster-cran35/
Then back in the terminal
sudo apt-get install xclip
sudo apt install -y r-base r-base-dev
sudo apt-get install gdebi-core
sudo apt install -y libgstreamer1.0 libgstreamer-plugins-base1.0 libxslt-dev libnss3
sudo apt --fix-broken install
sudo curl -o rstudio.deb https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5033-amd64.deb
sudo dpkg -i rstudio.deb
sudo apt-get update; sudo apt-get upgrade; sudo apt --fix-broken install; sudo apt-get update --fix-missing; sudo apt autoclean; sudo apt-get clean; sudo apt-get autoremove
ORIGINAL ANSWER:
It admittedly took me a long time, but I was finally able to install R and RStudio on my Chromebook Samsung 3. I have it set-up with Crouton with XFCE/Xiwi and use Trusty. After setting up Crouton, etc. here is what I had to do in the Linux terminal:
sudo apt-get install software-properties-common
sudo apt-get install selinux-policy-default
sudo apt-get install libqpol1
Add these lines:
deb https://<FOO>/bin/linux/ubuntu trusty/
deb https://<FOO>/ trusty-backports main restricted universe
to file
/etc/apt/sources.list
(replace FOO with the CRAN mirror of your choice and replace trusty if applicable)
Terminal:
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rrutter
sudo apt update
sudo apt upgrade
sudo apt upgrade r-base r-base-dev
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-1.1.442-amd64.deb
sudo gdebi rstudio-server-1.1.442-amd64.deb
wget https://download1.rstudio.org/rstudio-0.99.896-amd64.deb
sudo apt-get install libxslt1-dev
sudo gdebi rstudio-0.99.896-amd64.deb
cd /usr/bin/
rstudio
source
source
source
source

Docker - R creates multiple processes

I'm creating a docker container and I'm installing R in it.
The problem is, that when running R in the container, the main R process create ncores - 1 subprocesses.
So when running the docker on my laptop with 8 cores, I get 1 R process and 7 R subprocesses.
I also tried to configure my Docker file similar to this:
https://github.com/rocker-org/rocker/blob/eeb9c8a5f416f7cfe982734440e39fa72abbcb33/r-base/Dockerfile
but is still not working.
Docker-file:
FROM ubuntu:14.04
RUN sed -e 's/archive\.ubuntu/at\.archive\.ubuntu/g' -i /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install libatlas3-base
RUN apt-get -y install libopenblas-base
RUN apt-get -y install r-base
RUN apt-get -y install r-base-dev
RUN apt-get -y install apt-utils
RUN echo "deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ trusty/" >> /etc/apt/sources.list
RUN gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
RUN gpg -a --export E084DAB9 | apt-key add -
RUN apt-get update
RUN apt-get -y --with-new-pkgs upgrade
Did someone encountered this problem?
I don't know why, but the whole problem was caused by installing libopenblas-base.
After removing the line
RUN apt-get -y install libopenblas-base
everything worked fine!

Resources