How to install Heroku on Termux - android

I want to install Heroku on Termux on my Android Tecno droipad but I get this message after each trial:
$ apt install heroku
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package heroku
That's what I get when I run the command: $apt install heroku.
What should I do to have heroku installed?

From this Github repo :
termux-chroot
cd /
wget
https://cli-assets.heroku.com/branches/stable/heroku-linux-arm.tar.gz
mkdir -p /usr/local/lib /usr/local/bin
tar -xvzf heroku-OS-ARCH.tar.gz -C /usr/local/lib
ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku
/usr/local/lib/heroku/install
cd /home/.local/share/heroku/cli/lib
mv node node_broken
ln -s /usr/bin/node ./node

Related

Install Git in Pydroid 3 terminal

I'm using Pydroid3 and would like to use Git in the Pydroid Terminal.
In my Termux terminal I was able to install Git as described here: Python and Git on Android
The git command is now only recognized in the Termux Terminal but not in Pydroid :(. Installation of Git with apt-get in the Pydroid Terminal is not possible.
Has anybody managed to install Git for Pydroid?
This is working for me; you might need to tweak the curl or configure commands if things fail. I haven't looked into ssh for now, only https.
# enter dev folder
cd $HOME
# set a prefix variable for convenience
export PREFIX="$(readlink -f "$PKG_CONFIG_PATH"/../..)"
# if you want git-remote-https, first build and install curl
curl -LO https://curl.se/download/curl-7.77.0.tar.bz2
tar -jxvf curl-7.77.0.tar.bz2
cd curl-7.77.0
./configure --prefix="$PREFIX" --disable-static --with-openssl --with-ca-path=/system/etc/security/cacerts --with-ca-bundle="$SSL_CERT_FILE"
make -j8 install
cd ..
# download and enter git sources
curl -LO https://www.kernel.org/pub/software/scm/git/git-2.32.0.tar.gz
tar -zxvf git-2.32.0.tar.gz
cd git-2.32.0
# reconfigure git for platform
./configure --prefix="$PREFIX" --without-tcltk --disable-pthreads LDFLAGS="-lssl -lcrypto -lz"
# if you didn't install curl, download autoconf's install script since there is no coreutils on android
# curl "http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;f=build-aux/install-sh;hb=HEAD" -o install
# otherwise copy curl's install script in
cp ../curl-*/install-sh install
# build and install git
make -j8 install INSTALL="sh $(pwd)/install"

Android repo init : SSL_CERTIFICATE_VERIFY_FAILED error

For downloading the Android Source code :
I am issuing
repo init -u https://android.googlesource.com/platform/manifest
But I am getting the below error :
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [SSL_CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c :726)
fatal: cloning the git-repo repository,will remove '.repo/repo'
What I have tried ?
-I have tried visiting https://android.googlesource.com/platform/manifest and https://gerrit.googlesource.com/git-repo/clone.bundle from the google chrome and internet explorer and there is no issue
-Tried changing the https to http in the repo init command
-modified the repo script and changed https to http
-modified the gitconfig as below :
[user]
name = myName
email = myemail.id
[http]
proxy = http://user:passwd#gateway.com:8080
sslVerify = false
[https]
proxy = https://user:passwd#gateway.com:8080
sslVerify = false
How can I import the certificates for these sites ?
I am using Ubuntu 18.04 .
Is there a way to force ignore this?
PS : I am behind the proxy and have already setup the proxy settings and it is working fine.(tried sudo apt-get update)
i am a MAC user (Mojave). I have the same error.
When i launch:
repo init <repository url>
I get this error:
Downloading Repo source from https://gerrit.googlesource.com/git-repo
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
The problem seems due to Python 3.6 on MacOS that comes with its own private copy of OpenSSL. That means the trust certificates in the system are no longer used as defaults by the Python ssl module. To fix that, you need to install a certifi package in your system.
Solved with:
open /Applications/Python\ 3.6/Install\ Certificates.command
OK , I fixed this by setting the environment variable PYTHONHTTPSVERIFY to 0
export PYTHONHTTPSVERIFY=0
Python, since v2.7.9, will by default now check the SSL certificates. To revert to the correct behavior for the repo script, set up an environment variable PYTHONHTTPSVERIFY=0.
This will shut off all certificate verification.
The repo script should now run as advertised.
I spent 3 hours on this topic and finally found these command works for me.
My python3 is Python 3.6.9 and python is Python 2.7.17 running on Ubuntu 18.04.
sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig
sudo apt-get install openjdk-8-jdk android-tools-adb bc bison build-essential curl flex g++-multilib gcc-multilib gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-gtk3-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc yasm zip zlib1g-dev git-core python3.8 libncurses5
sudo apt-get install ca-certificates
sudo update-ca-certificates --fresh
sudo update-alternatives --install /bin/python python /usr/bin/python3 1
sudo update-alternatives --install /bin/python python /usr/bin/python3.8 2
sudo update-alternatives --config python //choose 2
mkdir ~/bin
PATH=~/bin:$PATH
curl -k https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo
chmod a+x repo
git config http.sslVerify false
export PYTHONHTTPSVERIFY=0
git config --global user.name "xxx"
git config --global user.name "xxx#xxx.com"
mkdir ./workspace
cd workspace
which repo
repo init -u https://android.googlesource.com/platform/manifest -b master
repo sync -j2
Hope my sharing could help you :)

How to install and run appium in linux?

I want to do UI automation for opening an url in a real android device. For that I want to install and run appium on my linux system, please guide me how to do? Also suggest me Is there anyway to open an url in chrome browser using eclipse??
Install appium on Linux 18.04
If you have node.js installed you can try :
sudo npm install -g appium --unsafe-perm=true --allow-root
it worked for me.
I guess all the information you need to run Appium in Linux is in this here:
http://appium.io/docs/en/about-appium/getting-started/
how to run your test
http://appium.io/slate/en/master/?ruby#running-tests
and a bunch of sample code here
https://github.com/appium/sample-code
and if you want to run your test in Chrome Browser you will need Chromedriver, it's already integrated in the appium project. More info here:
https://sites.google.com/a/chromium.org/chromedriver/getting-started
Install Appium on Linux(Fedora 22)
$ sudo dnf update -y
$ sudo dnf groupinstall -y "Development Tools"
$ sudo dnf install -y autoconf automake libtool gettext git scons cmake flex bison libcurl-devel curl ncurses-devel ruby bzip2-devel expat-devel
$ git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew
Until LinuxBrew is fixed, the following is required.
Add to .bashrc:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH
## Setup linux brew
export LINUXBREWHOME=$HOME/.linuxbrew
export PATH=$LINUXBREWHOME/bin:$PATH
export MANPATH=$LINUXBREWHOME/man:$MANPATH
export PKG_CONFIG_PATH=$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH
$ ln -s $(which gcc) ~/.linuxbrew/bin/gcc-4.4
$ ln -s $(which g++) ~/.linuxbrew/bin/g++-4.4
$ brew update
$ brew install node # get node.js
$ npm install -g appium # get appium
$ npm install wd # get appium client
$ appium & # start appium
Hello appium installation is very simple , please check below steps
1)Install Latest Node.js
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
More information please check official website : https://nodejs.org/en/download/package-manager/
2) Install latest Appium
npm install -g appium
or
sudo npm install -g appium
More information please check official documentation :
https://www.npmjs.com/package/appium
install on nvm
sudo apt install build-essential checkinstall
sudo apt install libssl-dev
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
node -v
npm -v
npm install -g appium

Failed to build gem native extension when installing Calabash Android on Ubuntu

I want to install Calabash Android on Ubuntu(13.10). I have gem (1.8.23) and ruby (1.9.3p194) installed and tried to run "sudo gem install calabash-android" but keep getting messages saying "Failed to build gem native extension", below is the full messages:
Building native extensions. This could take a while...
ERROR: Error installing calabash-android:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from extconf.rb:1:in `'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/gherkin-2.12.2 for inspection.
I tried "sudo apt-get update" but it didn't fix the issue. And I also checked gcc so it shouldn't be build issue. Does anyone have any suggestions? Thanks in advance!
While installing ruby, select development version or full version, so on my system with ubuntu 12.04, i would use
sudo apt-get install ruby1.9.1-full
also please make sure android home path and ant path is proper
Thanks
You can use rbenv that manage perfectly ruby gems versions like nvm does for node.js:
$ sudo apt-get update
$ sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
$ sudo apt-get install rbenv
$ exec $SHELL
$ rbenv install 2.2.2
$ rbenv global 2.2.2
$ ruby -v
$ echo "gem: --no-ri --no-rdoc" > ~/.gemrc
$ gem install bundler

"ImportError: No module named readline" running "repo init"

I downloaded the source of Android, but when I used repo init according to the website, I got the following error:
Traceback (most recent call last):
File "/root/bin/repo", line 91, in <module>
import readline
ImportError: No module named readline
I am using Ubuntu 10.04 and Python 2.7.2
AFAIK, the default Python environment in Ubuntu 10.04 is Python 2.6.5, so you must be using a self-compiled python.
You should be missing some readline header files when building your python 2.7.2, so you have two choices now:
Re-compile your python, with libreadline?-dev installed.
Install the standalone version of readline, using pip install readline or easy_install readline
I have the same issue, and I fixed it in this way, hope it will be helpful to you.
$ source Install_Python2.7.5.sh
Shell script "Install_Python2.7.5.sh" is like this:
#!/bin/bash
sudo apt-get install libreadline-dev
sudo aptitude install build-essential libreadline5-dev
sudo apt-get install libbz2-dev
if [ ! -d ~/software/Python/Python-2.7.5 ]; then
mkdir ~/software
mkdir ~/software/Python
mkdir ~/software/Python/Python-2.7.5
fi
if [ ! -d ~/bin ]; then
mkdir ~/bin
fi
user_root=~
echo $user_root
echo "unpackage Python-2.7.5.tar.bz2..."
tar -jxvf Python-2.7.5.tar.bz2
echo "prepear to install Python-2.7.5"
cd Python-2.7.5
sed -i "s/#readline/readline/g" Modules/Setup.dist
echo "Start to install Python-2.7.5"
./configure --prefix=$user_root/software/Python/Python-2.7.5/ && make && make install
echo "Make symbol link"
ln -s -f $user_root/software/Python/Python-2.7.5/bin/* $user_root/bin
echo "Set environment variable"
PATH=$user_root/bin:$PATH

Categories

Resources