I am trying to install dotnet-sdk-3.0 on linux AMI 2 ec2 instance (c6g). I am new to linux so tried couple of commands but nothing seems working for me. I tried below.
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
sudo yum install dotnet-sdk-3.1
sudo yum install dotnet-sdk-3.0
When tried above i am getting below error.
[ec2-user#ip-0-0-0-0 console]$ sudo yum install dotnet-sdk-3.0
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00
amzn2extra-docker | 3.0 kB 00:00
amzn2extra-nginx1.12 | 1.3 kB 00:00
packages-microsoft-com-prod | 3.0 kB 00:00
packages-microsoft-com-prod/primary_db | 288 kB 00:00
No package dotnet-sdk-3.0 available.
Error: Nothing to do
Then i tried
mkdir -p "$HOME/dotnet" && tar zxf dotnet-sdk-3.0.100-linux-x64.tar.gz -C "$HOME/dotnet"
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
After this tried the dotnet command but got the error. dotnet: command not found
Finally tried below:
mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-3.1.302-linux-arm64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
dotnet
dotnet --list-sdk
when i run this, i got below error
[ec2-user#ip-0-0-0-0 home]$ dotnet --list-sdk
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
at System.Globalization.GlobalizationMode..cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.CultureInfo..cctor()
at System.String.ToLowerInvariant()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetArch()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment..cctor()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath()
at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization()
at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit()
at Microsoft.DotNet.Cli.Program.Main(System.String[])
Aborted
also tried to run the dotnet <dotnet-project.dll> and received this error.
Failed to load â–’râ–’), error: /home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0/libhostpolicy.so: cannot open shared object file: No such file or directory
An error occurred while loading required library libhostpolicy.so from [/home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0]
[ec2-user#ip-0-0-0-0 console]$
I have followed the microsoft document as well.
https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos
Nothing seems working for me. Can someone please help me here, i am stuck from last 2 days.
Thanks in advance.
PS: I am completely newbie to linux.
I was able to get this to work on Amazon Linux 2 ARM64 with the following steps:
Download and build a recent version of International Components for Unicode. Amazon Linux 2 has version 50 available in the package manager, but dotnet looks for version 55 or later. When Amazon Linux updates this, this step won't be necessary anymore and can be replaced with sudo yum install icu.
Install gcc and python3 because they'll be needed for building libicu. It takes a few minutes to build the library. Amazon Linux 2 recently added libicu60 to the package manager, so you can simply install it with yum:
sudo yum -y install libicu60
Follow the instructions from Microsoft to install the dotnet sdk. Download the dotnet sdk from the Microsoft Website. You may need to download from this link to get the latest version, but the link below worked for me.
cd ~
wget https://download.visualstudio.microsoft.com/download/pr/5ee48114-19bf-4a28-89b6-37cab15ec3f2/f5d1f54ca93ceb8be7d8e37029c8e0f2/dotnet-sdk-3.1.302-linux-arm64.tar.gz
mkdir -p $HOME/dotnet && tar zxf ~/dotnet-sdk-3.1.302-linux-arm64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
Test that it's working
[ec2-user#ip-172-31-69-243 ~]$ dotnet --list-sdks
3.1.302 [/home/ec2-user/dotnet/sdk]
You are running this on arm64/aarch64. It's a relatively new architecture. It's also incompatible with the Intel 64-bit architecture (x86_64 or x64). So you need to watch out for that.
Installing via RPM
Edit: So, this is just not going to work if you want to use RPM packages.
Quoting https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos:
Package manager installs are only supported on the x64 architecture. Other architectures, such as ARM, must manually install the .NET Core SDK or .NET Core Runtime. For more information, see the manually install section below.
You are using aarch64/arm64. You are not using x64, so this is not going to work.
You need to use the tarball installation method.
Out of date suggestions:
I am trying to install dotnet-sdk-3.0 on linux AMI 2 ec2 instance (c6g).
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
You are running Amazon Linux 2, right? As the URL here says, this is for CentOS 7. It may (or it may not) work on your Linux distribution. Anyway, try it out.
$ sudo yum install dotnet-sdk-3.0
No package dotnet-sdk-3.0 available.
Error: Nothing to do
The error says that it can't find this package. Maybe a package with this name doesn't exist? Maybe you are using the wrong name? Try using yum list to find the correct name:
sudo yum list 'dotnet-sdk*'
It should show you a list of packages, including names like dotnet-sdk-3.0.103. You can install that package by name, then:
sudo yum install dotnet-sdk-3.0.103
If that doesn't work, try another package name from yum list and try installing that.
Installing manually
Then i tried
mkdir -p "$HOME/dotnet" && tar zxf dotnet-sdk-3.0.100-linux-x64.tar.gz -C "$HOME/dotnet"
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
After this tried the dotnet command but got the error. dotnet: command not found
You are running an aarch64 machine. You need to use the arm64 tarball, not the x64 tarball. The x64 tarball is for an Intel processor. It will not work on an ARM processor.
That's surprising. Let me break down what this set of steps is doing:
mkdir -p "$HOME/dotnet" creates a directory named dotnet in your home directory
tar xf ... extracts the dotnet SDK tarball in the dotnet directory you created in step 1
export DOTNET_ROOT=$HOME/dotnet defines an environment variable DOTNET_ROOT. .NET Runtime needs it; I am a bit fuzzy myself on why
export PATH=$PATH:$HOME/dotnet adds the directory you installed the .NET SDK into to the environment variable PATH. PATH is a list of locations that the OS uses to search for a command that you enter. For example, when you type dotnet in the command line it searches for dotnet executable (think dotnet.exe on Windows) in this list of directories.
So let's try and debug it one by one:
Does the directory dotnet exist in your main home directory (aka $HOME)? Can you cd ~/dotnet? Does that work?
After you extract the tarball, do you see a file named dotnet in the dotnet directory in your $HOME? Does ls $HOME/dotnet/dotnet work? What does it show you?
What does echo $PATH show you? Does it include that dotnet directory in the value?
If you run which dotnet, does it find the dotnet executable in your main $HOME directory?
Running the SDK
when i run this, i got below error
[ec2-user#ip-0-0-0-0 home]$ dotnet --list-sdk
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support
The error includes this phrase: Couldn't find a valid ICU package installed on the system.
It really means that. You need to install the ICU package for your Linux distribution:
sudo yum install libicu
And then try running dotnet --list-sdk again.
Error Running dll
Failed to load â–’râ–’), error: /home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0/libhostpolicy.so: cannot open shared object file: No such file or directory
An error occurred while loading required library libhostpolicy.so from [/home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0]
This is strange. It says it can't find a file that should be part of the .NET Core installation.
What does dotnet --list-runtimes say? Does it show the 3.0.0 runtime installed? If not, that means your installation is messed up. You should probably install .NET Core 3.0 again. (Or better yet, install 3.1 because 3.0 has been end-of-life'd).
Does the file /home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0/libhostpolicy.so exist? If it doesn't it's the same problem as above: your installation is messed up.
What does file /home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0/libhostpolicy.so say? Is it an ELF 64-bit LSB shared object?
The output is: ELF 64-bit LSB shared object, x86-64
This is a x86-64 file! In other words, you have (somehow) installed an linux-x64 (Intel 64-bit architecture) runtime. Not too surprisingly, it doens't work on the ARM 64 bit architecture. You need to delete this and re-install the SDK. I suggest just blowing away your current installation (rm -rf $HOME/dotnet) and install the linux-arm64 SDK again.
Related
i want to install a newer version of terrafrom 0.12.24 on windows 10 linux subsystem. i am new to using this interface and i am not sure how to do it
i installed terraform on Windows 10 linux subsystem using these commands
wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip -O
terraform.zip;
unzip terraform.zip;
sudo mv terraform /usr/local/bin;
rm terraform.zip;
however this installed older version.. and when i ran some script it gave me this error.
Failed to load root config module: Error parsing terraform/local/terraform.tf: At 119:12: Unknown token: 119:12 IDENT file
To fix this i am planning to upgrade to newer version of terrafrom 0.12.24. could someone provide me with commands to uninstall and install newer version of terraform thanks.
This should install 0.12.24 version
wget https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip
unzip terraform_0.12.24_linux_amd64.zip
sudo mv terraform_0.12.24_linux_amd64 /usr/local/bin
rm terraform_0.12.24_linux_amd64.zip
Let me explain what these steps are:
1) The link given along with wget is the downloadable link for the required package. wget helps in downloading it. I changed the version here as your required version.
2) unzip it
3) moved to /usr/local/bin folder.
4) Removing the zip as we have already copied the contents to bin folder
This is probably more appropriate as a comment but I do not yet have the reputation to do that. As of version 0.15.1, it unzipped only as "terraform", so line 3 in the above answer could just be:
sudo mv terraform /usr/local/bin
And this worked for me.
I am trying to install libnetfilter_queue on Suse Linux. But after the
./configure step it shows
error: Package requirements (libmnl >= 1.0.3) were not met
No package 'libmnl' found
I am new to Linux and all the solutions which are available on the web, I don't know how to use them.
How can I fix this problem?
It is a common problem to the people working in computer networking in linux environments.
Go to the below link and download the latest libmnl file.
http://www.netfilter.org/projects/libmnl/downloads.html#libmnl-1.0.3
Unzip it using the below command
tar -xvf libmnl-1.0.3.tar.bz2
cd to the extracted folder
cd libmnl-1.0.3/
Install libmnl
./configure
make
sudo make install
Then you can install the libnetfilter_queue library.
The Problem:
I have a program I am installing from source. When I run ./configure, it stops saying "no protobuf development libraries found", however, protobuf is installed on my system.
How do I specify the path to those libraries when I run ./configure?
The program I am trying to install is osm2pgsql on CentOS 6.6.
Update:
I fixed the problem fortunately.
What Happened?:
osm2pgsql uses pkg-config to point to dependent libraries. On CentOS 7 pkg-config uses this directory /usr/share/pkgconfig/. Within this directory there are .pc files for different programs. These files are used by pkg-config to show where libraries of certain programs are located. When you install protobuf from package manager or source the installation doesn't automatically let pkg-config know where the libraries are at via a .pc file.
The Fix:
Install protobuf from source from their git page. After you've ran make install there will be several .pc files within the cloned directory. You need to place these in /usr/share/pkgconfig. To do this run the following in the cloned directory:
sudo cp protobuf.pc* /usr/share/pkgconfig/
sudo cp protobuf-lite.pc* /usr/share/pkgconfig/
Conclusion:
Ta Da! Now go back to your osm2pgsql install folder and rerun ./configure.
I am trying to install pycharm on my linux OS.
following the instructions pycharm/dowload.
Since I run a linux machine I made sure the pychrarm files in the current directory:
ietX220:~$ ls
Desktop pycharm-community-4.0.1
Documents Music
pycharm-community- 4.0.1.tar.gz
Downloads New Folder Templates
Dropbox octave-workspace Videos
examples.desktop Pictures VirtualBox VMs
jdk1.8.0_25 Public Win7-PV2hh-6c3HY-
QJHM9-8RJJH-P86W8.iso
ietX220:~$ pycharm-*.tar.gz
pycharm-community-4.0.1.tar.gz: command not found
As you can see the pycharm file is in the current(home) directory but is not found.
Then I opened the tar file made pycharm.sh executable:
chmod +x pycharm.sh
And then ran:
~/pycharm-community-4.0.1/bin$ ./pycharm.sh
Startup Error: Application cannot start in headless mode
What am I doing wrong?
I am having the same issue. It looks like maybe you and I both have a minimal (headless) Java install on our systems. Use your system's method for finding installed packages and search for Java, and i'll bet you find only openjdk-headless
yum list installed | grep openjdk
# or on debian-based systems
# dpkg --get-selections | grep openjdk
# =>java-1.7.0-openjdk-headless
Solution then is to install the same package without the "-headless" suffix.
Here's where I am getting my information for the solution: https://bugzilla.redhat.com/show_bug.cgi?id=1177379
I had the same problem and as mentioned before the error was that openjdk was headless. What i did is i installed from the begining openjdk using the command apt-get install default-jdk (for ubuntu). I know it's not the best way to do it, however it is rather quick and simple.
If you have already all the prerequisites (such as Java) installed, try out charmy (PyCharm installer for Linux).
virtualenv charmy-env
source charmy-env/bin/activate
pip install charmy
charmy install
That will install PyCharm into your home directory. It will also simplify your feature PyCharm upgrades. To upgrade you would just have to type
charmy install
instead of downloading distribution manually, unpacking it, etc.
See https://pypi.python.org/pypi/charmy for more.
PYcharm is now available as a snap. Can be easily installed as below
sudo apt update && sudo apt install snapd
Then the community edition can be installed by
sudo snap install pycharm-community --classic
The classic escape is to get snaps that have been published with classic confinements
220:~$ pycharm-*.tar.gz
pycharm-community-4.0.1.tar.gz: command not found
gz files are not executable files. I think the current directory is not in your PATH variable. To get around that you would do "./pycharm-community-3.0.1.tar.gz" and you should see the message "Permission denied" as the gz file would not have execute permission. And if you gave it execute permission it would say "cannot execute binary file: Exec format error".
These are the instructions from the JetBrains website:
Copy the pycharm-*.tar.gz to the desired installation location
(make sure you have rw permissions for that directory)
Unpack the pycharm-*.tar.gz using the following command:
tar xfz pycharm-*.tar.gz
Remove the pycharm-*.tar.gz to save disk space (optional)
Run pycharm.sh from the bin subdirectory
NOTE: PyCharm on Linux doesn't need special installation or running
any installation script. It runs out of the pycharm-*.tar.gz
If you run the command "tar xfz pycharm-*.tar.gz" you should end up with a directory in your current directory named "pycharm-community-4.0.3".
If you cd pycharm-community-4.0.3/bin, "ls -al" should show that pycharm.sh is already executable. Run pycharm.sh and you should be done. The script will prompt for a password at the end so it can put a startup script in a system directory. You must have admin privileges for that part to work. But if you don't, you can still start PyCharm by executing "[path to pycharm directory]/bin/pycharm.sh &" at the command prompt.
I am not sure what the "NOTE:" is saying, but I would ignore it as you get a working PyCharm by doing what it says above the NOTE: .
Setup the newest stable jdk(like jdk1.7 or jdk 1.8) in your system, and set it is the default jdk.
1.download JDK8
2.SET JAVA HOME
sudo gedit /etc/environment
export JAVA_HOME=/home/username/Java/jdk1.8
export JRE_HOME=/home/username/Java/jdk1.8
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
sudo gedit /etc/profile
//before umask xxx adde
export JAVA_HOME=/home/username/Java/jdk1.8
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$JAVA_HOME/bin
3. run pycharm
./pycharm.sh
I created native installers for my air application successfully under MacOS and Windows.
With Ubuntu 10 I am able to create a .deb package, but when I launch it opens the Ubuntu software center showing error:
Dependency is not satisfiable: adobeair (>= 2.5.0.0)
I thought native installer should be able to download the proper adobe air version if available (2.5.1 seems available as deb package). If I install air for linux 2.5.1 from adobe website my application launches fine.
Did anyone experience the same issue?
Thanks in advance for any help
Paolo
Unfortunately, many years late "Adobe AIR for Linux is no longer supported." following what adobe page says. Using the "AIR archive" is possible to get unsupported versions, the 2.6.0 version is the most recent available. If you need to install a program that require a newer version of it, you might go to Virtual box with a Windows guest.
For version 2.6.0 the recommend steps for Ubuntu 16.10 are:
for 32bit machine
wget -O adobe-air_i386.deb http://drive.noobslab.com/data/apps/AdobeAir/adobeair_2.6.0.2_i386.deb
sudo dpkg -i adobe-air_i386.deb
sudo apt-get install -f && rm adobe-air_i386.deb
for 64bit machine
wget -O adobe-air_amd64.deb http://drive.noobslab.com/data/apps/AdobeAir/adobeair_2.6.0.2_amd64.deb
sudo dpkg -i adobe-air_amd64.deb
sudo apt-get install -f && rm adobe-air_amd64.deb
The recommend steps for Ubuntu 16.04/14.04/12.04/Linux Mint 18/17/13 (both extracted from here):
wget -O adobe-air.sh http://drive.noobslab.com/data/apps/AdobeAir/adobe-air.sh
chmod +x adobe-air.sh;sudo ./adobe-air.sh
What version of the adobeair package is available from the Ubuntu repositories?
A .deb is just an archive and the dependencies have to be available from the repositories the system is configured to use. It can't resolve the dependency by downloading it from some specific location you know of but the system is not configured to use.
If the needed version of the package is not available from the Ubuntu repositories then your only options are to reconfigure the system to use an additional repository that does have the needed dependency before you try to install your package, or download and manually install the dependency before you try to to install your package.
Try to install itdpkg -i --force-architecture adobeair.deb