Issue with installation Android Commnad-line tools - linux

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

Related

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

Install Android Studio on Linux Mint 18.1 - Permission Denied

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

Failing to add Android Studio path to enviornment variable. (ubuntu 14.04)

I have done following steps
1. gedit ~/.bashrc
2. added
# Add the Android Studio /bin directory to PATH
export PATH=$PATH:~/opt/android-studio/bin
3.source ~/.bashrc
Rebooted the laptop and tried to open studio.sh using
user#user:~$ sudo ./ studio.sh
[sudo] password for user:
sudo: ./: command not found
user#user:~$ ./studio.sh
bash: ./studio.sh: No such file or directory
user#user:~$ studio.sh
studio.sh: command not found
user#user:~$ sh studio.sh
sh: 0: Can't open studio.sh
Please tell me the correct way to do it.
You might want to try ln -sf /opt/android-studio/bin/studio.sh ~/.local/bin/android-studio, then use command android-studio to launch?

Cannot run most cordova commands without using sudo

I have installed npm to setup Ionic & Cordova - and I have used sudo for this?
My question is when I run the following command without sudo I get an error:
cordova emulate ios
The error is an
EACCES, permission denied ..... /ios.json
Am I right that if I cannot use this 'basic' cordova command without running sudo my installation has been screwed up somehow?
I did the following on the terminal to allow me to run the commands without using sudo (this might help someone)
sudo chown -R $(whoami) ~/Documents/mobileapps
This meant the cordova emulate ios command now runs! finally!

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