Pycharm on Raspbian NO JDK found - raspberry-pi

i was trying to install Pycharm on my Rasberry PI and as i typed "./pycharm.sh" in the Terminal to install it, i get this error:
No JDK found.Please validate eiter PYCHARM_JDK,JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.
I followed this Tutorial for the Install
https://www.youtube.com/watch?v=jAjwzkEDrgI
Is anyone familiar with this problem?

Install a valid JDK. You may use:
sudo apt-get install openjdk-11-jdk```
It worked for me.

Related

I got an error while creating virtualenv. It thows cmd not defined error

└─$ python3 -m venv venv
Error: name 'cmd' is not defined
┌──()-[~/Documents/Software Development/DjangoAuth/simplejwt]
└─$ source venv/bin/activate
source: no such file or directory: venv/bin/activate
It used to work fine on my other laptop while I just freshly installed new OS here, it throwing an odd error.
This bug report (found by search) suggests you don't have python-venv package installed. Install it:
sudo apt-get install -y python3-venv
The error message is due to a conflict in the versions of Python installed on my system. The package python3.10-venv depends on version 3.10.8-3 of Python, but version 3.10.9-1 is to be installed.
To resolve this issue, I tried the following:
Check the version of Python I have installed by running the command python3 --version.
If I have a version of Python other than 3.10.8-3, I tried uninstalling it and installing version 3.10.8-3 instead.
Once I have installed the correct version of Python, I install the python3-venv package again using the sudo apt-get install -y python3-venv command and it worked.
Thanks all who helped!

VS Code: Error while installing 'C/C++' extension. Please check the log for more details

While downloading any extension, I am having above error. I uninstalled the vs-code and installed it again, but the same problem occurs. How to solve this problem?
you can add extension via terminal. here are the steps to install the GCC compiler on Ubuntu:
sudo apt update
sudo apt install build-essential the command installs a bunch of new packages including gcc, g++ and make.
to check the version type the command gcc --version
Running as admin worked for me after experiencing the same issue.

Vagrant cannot install nokogiri-dependent plugins

I'm trying to install the rackspace plugin for vagrant (1.5.1):
vagrant plugin install vagrant-rackspace
But it complains
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing nokogiri (1.6.1), and Bundler
cannot continue. Make sure that gem install nokogiri -v '1.6.1'
succeeds before bundling.
However gem install nokogiri -v '1.6.1' and /Applications/Vagrant/embedded/bin/gem install nokogiri -v '1.6.1' both work.
I've looked at a bunch of SO threads and blog posts. Things I've tried that have not worked
Running xcode-select --install
Installing full xcode
brew install gcc-4.2
Remove rvm and rvm version of ruby
Install nokogiri w/ built-in (mac) ruby and vagrant-embedded ruby
Despite the fact that nokogiri installs fine (#5 above) without sudo on both counts, vagrant plugin install vagrant-rackspace still fails...
So, in summary, I can install the nokogiri plugin, however I cannot install the vagrant rackspace plugin, can you help me get the plugin installed?
Related threads
Error to install Nokogiri on OSX 10.9 Maverick?
nokogiri - ERROR: Failed to build gem native extension
Full output of vagrant plugin install vagrant-rackspace --debug
I'm on OSX Mavericks and this worked for me:
Set as environment property:
NOKOGIRI_USE_SYSTEM_LIBRARIES=1
Then install as usual:
vagrant plugin install vagrant-rackspace
Vagrant ships with embedded Ruby and isolated gem environment. So installing gems manually to your "normal" gem environment won't help.
The first issue is that you should never use sudo to run any vagrant command. If possible, please remove ~/.vagrant.d/ or at least chown it recursively back to your own user. You could also try upgrading Vagrant to v1.5.1.
Then please gist/pastebin the output of vagrant plugin install vagrant-rackspace --debug and ~/.vagrant.d/gems/gems/nokogiri-1.6.1/ext/nokogiri/mkmf.log.
The posted solutions didn't work for me. Instead I needed to specify the libxml2, libxslt and libiconv that I installed with homebrew (Do this first).
I installed the gem manually with the embedded ruby with the following [very concise] command line:
/Applications/Vagrant/embedded/bin/gem install \ # select the embedded ruby
--install-dir ~/.vagrant.d/gems \ # install to the vagrant dir
nokogiri -v '1.6.2.1' -- \ # pass options to nokogiri install
--with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 \
--with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib \
--with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 \
--with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include \
--with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
This worked for me on Mavericks and Vagrant 1.6.1:
CC=/usr/bin/gcc vagrant plugin install vagrant-rackspace
I tried NOKOGIRI_USE_SYSTEM_LIBRARIES=1 but got an error saying that system libxml2 is too old.
Warning: This is a super-hacky solution, though it's hard to call it that.
Yesterday I installed Vagrant on another OSX Mavericks box. Like many other posts I read on SO "all I had to do" was run xcode-select --install and bingo vagrant plugin install vagrant-rackspace worked like a charm.
Today I was mired down in the Bundler code again when it dawned on me that since this is an isolated ruby environment why not nuke my ~/.vagrant.d directory and copy the same directory from the successful build on the other box...
The result? A working vagrant rackspace on my laptop! I'm not sure I'll ever figure out what was really wrong, but if anyone wants a shot at the 100 point bounty, I'm still open to suggestions!
In my case the nokogiri folders and their files located in ~/vagrant.d/gems/gems had wrong rights (user/group).
After changing them to username:staff (username being your console user name), it works like a charm.
Similarly with my case, I have an issue while installing vagrant-omnibus plugin for Vagrant 1.6.3 on OSX Mavericks 10.9.4 and ruby 2.0.0p247 rbenv.
I tried setting the env NOKOGIRI_USE_SYSTEM_LIBRARIES to 1 or true, then update+install but the same error still there.
I found that there is a suggestion in https://github.com/mitchellh/vagrant/issues/3769 to use the specify the baked in nokogiri version and this works for me. So, I also wrote a quick noted for myself to refer this unfortunates issue.
If Nate Murray's solution doesn't work, I found upgrading to a Vagrant version > 1.6.4 fixed the issue (as noted in this Github issue: https://github.com/mitchellh/vagrant/issues/3769)
in my case while trying to install vagrant-parallels, i had to check the Command line tools folder had an error in the naming for some reason. Fixing that allowed nokigiri to work well

How to install Oracle JDK 7 and Netbeans IDE in Linaro 13.01 ubuntu tty1?

I have a Processor A13(cpu: cortex-A8 ARM v7) of allwinner and my OS is Linaro 13.01 Ubuntu tty1.
So how do I install Oracle JDK7 and Netbeans IDE on that?
If you're using Ubuntu, there are several ways to install NetBeans. One way is to use Ubuntu's "Software Centre" which you can use just to search to NetBeans and it should install it including all dependencies.
You can also use your web browser in Ubuntu and head to www.netbeans.org and click "Download" at the top right, there you can choose your operating system and download the correct version of NetBeans.
Once downloaded you can run the NetBeans installer through terminal using: sh ./<NetBeans file name here>. And the installer will start.
To install Open JDK:
However, you may need to download and install the JDK first; which you can also do in terminal by typing: sudo apt-get install openjdk-7-jdk.
To install Oracle JDK:
This is taken from this link: http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux
Remove open JDK from your system: sudo apt-get purge openjdk-\*
Create a new directory for the oracle JDK: sudo mkdir -p /usr/local/java
Download the Oracle Java JDK for linux by clicking here
Copy the Oracle Java binaries to the /usr/local/java directory: cd /home/userName/Downloads, sudo -s cp -r jfk-7u13-linux-x64.tar.gz /usr/local/java, cd /usr/local/java.
Extract the file: sudo -s tar xvzf jdk-7u13-linux-x64.tar.gz
Edit the system path file: sudo nano /etc/profile
Scroll to the bottom of the file and add this:
JAVA_HOME=/usr/local/java/jdk1.7.0_13
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
Save the file and exit (Ctrl+X), then enter "y" for nano.
Let Ubuntu know where the Oracle Java JDK is:
LOCN="/usr/local/jdk7"
sudo update-alternatives --install "/usr/bin/java" "java" "${LOCN}/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "${LOCN}/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "${LOCN}/bin/javaws" 1
Make sure Ubuntu knows to use this as the default JDK:
sudo update-alternatives --set java ${LOCN}/bin/java
sudo update-alternatives --set javac ${LOCN}/bin/javac
sudo update-alternatives --set javaws ${LOCN}/bin/javaws
Reload system path: /etc/profile, or just restart.
If you have trouble following my instructions then take a look at the link I posted above.
I would recommend using Open JDK instead though, as you can see; it's much easier to install.
I hope this helps.
Install Oracle JDK for ARM processor and Hard Float OS Image is here.
Oracle JDK for ARM Processor
And download Netbeans IDE 7.0.1 for Linux and install it.
Not to spoil your fun, but the A13 is a very weak SOC for this task.
I wouldn't even try anything below dual Cortex A15 with 2GB RAM (The Samsung XE303).
Oracle now releases the standard JDK8 for ARM Linux hardfloat so it is possible to install it on Debian/Ubuntu fairly easily:
Get JDK8 from Oracle's webpage (currently early access)
Extract th tar.gz-d JDK8 ARM/LInux/hfloat into /usr/lib/jvm/jdk1.8.0
Use update-alternatives (first answer)
Run "java -version" to check the results
..voila
I learned from Digital Ocean Docs how to manually install Oracle JDK on a headless ubuntu.
With a bit of Googling, I found following script to be useful.
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz

netbeans installation error: can't initialize ui running in headless mode

I'm trying to install NetBeans on Linux Mint, and I'm getting the following error every time I run the installation script:
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...
Can`t initialize UI
Running in headless mode
What should I do to get it working?
In case anyone has this problem in the future, Netbeans doesn't like OpenJDK 6 but -- fortunately -- it works fine with OpenJDK 7 (as expected as for Java 7 OpenJDK is the reference implementation). Just make sure you remove any Java 6 packages before installation attempts. On Ubuntu and Mint one can do:
sudo apt-get purge ^openjdk-6-*
sudo apt-get install openjdk-7-jdk
It should work afterwards.
Looks like Netbeans does not work properly with Openjdk. This is what I did (in Linux Mint 12):
sudo apt-get remove openjdk*
sudo apt-get install sun-java6-jdk
Then you will be able to run the .sh installer as usual.
I hit this same issue on Kubuntu 12.04 LTS but needed Sun JDK 6 for a project I'm maintaining. I stumbled upon Martin Wimpress' OAB-Java script (by way of help.ubuntu.com) which creates and installs a local apt repository for Sun JDK 6. You can find the latest instructions on Martin's github site which run as follows:
cd ~/
wget https://github.com/flexiondotorg/oab-java6/raw/0.2.7/oab-java.sh \
-O oab-java.sh
chmod +x oab-java.sh
sudo ./oab-java.sh
If you want to see what this script is doing while it is running then execute the following from another shell:
tail -f ./oab-java.sh.log
Alternatively, you can clone the OAB-Java repo and kick of the script from within it:
git clone git://github.com/flexiondotorg/oab-java6.git
cd oab-java6
sudo ./oab-java.sh
Either way, once that is in place follow Jose's instructions to remove openjdk and install sun jdk:
sudo apt-get remove openjdk*
sudo apt-get install sun-java6-jdk
One final note, the script accepts a -7 argument which will create and install a local apt repository for Oracle JDK 7 should you want to go that route.
I was able to get it to work by getting into the target system using ssh -X, then making sure DISPLAY was exported. That handles the X server issues.
Change the priority of the Oracle Java executables:
export PATH=/usr/java/latest/bin:$PATH
Run the installer:
./netbeans-8.1-linux.sh
What worked for me was installing default java environment from the terminal:
sudo apt-get install default-jre
The installation was a success - under "user".
The installation failed - under "su" (under Red Hat equivalent of "sudo"). With
Can`t initialize UI
Running in headless mode
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
For me.