Install Android Studio on Linux Mint 18.1 - Permission Denied - android-studio

Trying to install Android Studio 2.3.0.8 for Linux on Linux Mint 18.1 (64bit) however it isn't working.
I have downloaded the zip; android-studio-ide-162.3764568-linux.zip -from https://developer.android.com/studio/index.html and followed the instructions in the user guide and other stackoverflow questions but it won't install.
The steps I take are:
(1) Extract android-studio-ide-162.3764568-linux.zip to /home/username/Downloads. I have also tried moving the folder (using terminal command sudo mv from/file /usr/local and to /opt/). However the result is always the same
(2) Run in terminal; cd ./Downloads/android-studio/bin or /usr/local, etc. then enter the command ./studio.sh
I have tried tried this a number of times but it still wont work. ;
"username#username-MS-7970 ~/Downloads/android-studio/bin $ ./studio.sh
bash: ./studio.sh: Permission denied"
Any help would be much appreciated.
sezpanda#sezpanda-MS-7970 /opt/android-studio/bin $ sudo ls -a
[sudo] password for sezpanda:
. idea.properties log.xml studio.vmoptions
.. inspect.sh os subprocess
appletviewer.policy libbreakgen64.so studio64.vmoptions sys
fsnotifier libbreakgen.so studio.png
fsnotifier64 lldb studio.sh
sezpanda#sezpanda-MS-7970 /opt/android-studio/bin $

Simply download .zip from official url i.e. android_studio & then check whether there is java installed or not on your system, to check simply do,
java -version
will return something like this,
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)
Then extract .zip & go to extracted zip folder & then go to bin, open your Terminal & perform these two step & Android Studio will get successfully installed on your system,
sudo chmod +x ./studio.sh
sudo ./studio.sh

You might not have chmod +x studio.sh try sh ./studio.sh
If this was not it, try again like this: sh -x ./studio.sh. This will show you every line that is run and will help you debug it.
Good luck.

sudo chmod +x ./studio.sh
sudo sh ./studio.sh

Related

Issue with installation Android Commnad-line tools

I tried to install Android SDK Command-Line Tools on linux IDE inside chromeos:
unzipped commandlinetools-linux-9477386_latest.zip
made directory a/cmdline-tools/latest and put there command line tools files
After I tried to start working with it in the terminal
$ cd a/cmdline-tools/latest/bin//a/cmdline-tools/latest/bin
$ sdkmanager --list
following issue -bash: sdkmanager: command not found
kaniktree#penguin:~/a/cmdline-tools/latest/bin$ ls
apkanalyzer avdmanager lint profgen retrace screenshot2 sdkmanager
kaniktree#penguin:~/a/cmdline-tools/latest/bin$ ./sdkmanager
-bash: ./sdkmanager: Permission denied
kaniktree#penguin:~/a/cmdline-tools/latest/bin$ sudo ./sdkmanager
sudo: ./sdkmanager: command not found
It will be perfect to use android debugging on chromeos, hope to get your advice

How can I install a specific version of CMake with WSL on Windows

I installed CMake with the command :
sudo apt-get -y install cmake
But when I tried to Configure a WSL toolchain for my project in clion I have a message saying that my version is not supported.
My version is 3.24.1 and the supported is between 2.8 - 3.20.
Can I have the solution to my problem so I can downgrade the version?
Download the x86_64 .tar.gz package for Linux from the binary distributions section on the download page, e.g. version 3.24.2: ( https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.tar.gz ).
Unpack the archive to a suitable location on the wsl file system. You can make use of the fact that you can access the file system of the Windows host via /mnt/<lowercase drive letter>/....
sudo mkdir /opt
sudo tar xz -f /mnt/c/Users/Joki004/Downloads/cmake-3.24.2-linux-x86_64.tar.gz -C /opt
All you need to do is make sure the cmake command uses the cmake program from the bin directory of the unpacked archive. You could skip this step, if you want to use the path to the binary.
To do this you could add the following line to the end of ~/.bashrc
export PATH=/opt/cmake-3.24.2-linux-x86_64/bin:$PATH
(The line differs depending on the version of CMake you installed.)
echo "export PATH=/opt/$(ls /opt | grep -m 1 cmake)/bin:\$PATH" >> ~/.bashrc
Reopen the WLS terminal or source ~/.bashrc.
. ~/.bashrc
Check, if the process was successful:
cmake --version
Note: There's a good change CLion allows you to specify the path to the cmake executable via settings, so you may want to replace steps 3 to 5 with modifying CLion settings.

How would you properly install MATLAB in ubuntu that is running on WSL2?

I want to install matlab in ubuntu 20.04, but I'm running ubuntu in WSL2 and it doesn't want to work.
I keep getting the error: terminate called after throwing an instance of 'framework::window::DisplayError what(): No. Display Avaliable.
I have the linux version of matlab unzipped in a folwer and I'm trying to instal it into the user files. Things I've tried to install it that were suggested for people having the same issue on other distros:
sudo ./install
./install
bash install
install
bash ./install
sudo bash ./install
sudo su and then doing ./install
export DISPLAY=:0.0 and then sudo ./install
bash ./install -v -inputFile installer_input.txt
It gives the same error for every one that I've tried.
Let me know if anyone has any solutions. Thanks.
Posting this to help out others in the future. It actually involved a few things to get this fully working properly:
1)Had to get a X Server
2)Had to change display settings in ubuntu to get it to recognize the X server and turn off some firewall features for Windows.
3)Had to when installing matlab install using the legacy install file instead of the normal install file

uninstall Python3 downloaded from command line tools

I installed python 3.8.2 using xcode command line tools but now according to this article I should remove it to download Miniforge3. I didn't know how to do it so now I encountered this error when I ran command
file $(which python)
architecture error
According to the article and some online sources, it should only show arm64 but mine showed arm64e. When I navigated to condabin folder and try running conda init it crashed.
I think I should remove Python3 and start Miniforge installation process again, but I don't know how to delete it. I tried
sudo rm -rf /usr/bin/python3
but it said: Operation not permitted

Problems installing Pycharm

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

Resources