I tried to use Java with Termux using Termux Arch but it didn't work

I think this is probably the case

Android side must be 64bit

On the contrary, 64bit seems to be okay (I don't know because it wasn't 64bit)

trial and error

Termux Arch installation

Download TermuxArch with git. If you just clone it, you can create a TermuxArch directory, but it is difficult to type capital letters when moving the directory, so the directory name is changed to termuxarch.

$ git clone https://github.com/SDRausty/TermuxArch.git termuxarch/

Enter the created directory and execute the setup file.

~/termuxarch $ bash setupTermuxArch.sh

Somehow get angry.

necessaryfunctions.sh: line 106: /data/data/com.termux/files/usr/bin/applets/uname: No such file or directory

TermuxArch WARNING: Generated script signal 201 near or at line number 600 by `trap`!

It is said that there is no ʻuname in /data/data/com.termux/files/usr/bin/applets/`.

The WARNING directly below is probably a problem caused by it.

When I check the location with which uname, it says /data/data/com.termux/files/usr/bin/uname, and it certainly does not exist in the applets directory directly under bin.

I can't help it, so I'll put a link on the applets. I made it a hard link, but it's okay to use the -s option as a symlink.

$ ln /data/data/com.termux/files/usr/bin/uname /data/data/com.termux/files/usr/bin/applets/uname

Run setupTermuxArch.sh again and it works fine.

But also a similar error.

necessaryfunctions.sh: line 298: /data/data/com.termux/files/usr/bin/applets/md5sum: No such file or directory

WARNING md5sum mismatch! The download failed and was removed! ...

Similarly, it seems that there is no md5sum in /data/data/com.termux/files/usr/bin/applets/ this time. It's hard. Put the link with no heart.

$ ln -s /data/data/com.termux/files/usr/bin/md5sum /data/data/com.termux/files/usr/bin/applets/md5sum

You can now install it. When finished, you will be asked as follows.

Cleaning up installation files: DONE

Arch Linux in Termux is installed. Configuring and updating Arch Linux. Change the worldwide CMIRROR to a CMIRROR that is geographically nearby. Choose only ONE active CMIRROR in the CMIRRORs file that you are about to edit. Would you like to use nano or vi to edit the Arch Linux configuration files? Answer nano or vi [n|V]? 

You are asked which editor is better, nano or vim, for editing Arch Linux config files.

I use vim, so press v and Enter (you can just enter). If you use nano, press n and press Enter.

The Arch Linux configuration file opens. If you do not select a server here, you will get stuck. Since TermuxArch does not have an editor by default, it says "I want to install a package, but I can't because the server is not selected, and I want to rewrite the file to select the server, but there is no editor". Why not include an editor?

Arch Linux boots when you save and exit.

To exit Termux Arch

$ exit

Return to Termux with the following message.

Arch Linux in Termux PRoot is installed in /data/data/com.termux/files/home/arch.
...

Use ~/arch/startarch and startarch in a BASH shell to launch Arch Linux in Termux PRoot for future sessions. ...

In short, "Arch Linux was installed under the /data/data/com.termux/files/home/arch directory. To start it, run startarch with the bash command."

(When I try to run setupTermuxArch.sh, I get an error because it is already installed.)

Uninstalling Termux Arch

Written here => https://github.com/sdrausty/termux-archlinux/issues/3

Just type the following command in Termux.

$ bash setupTermuxArch.sh purge

Set up a DNS server to connect to the Internet

By default, what a DNS server is not set. ~~ If you can't connect to the net, it's just a box ~~

So when I try to update the package, I get angry with Could not resolve host.

Moreover, there is no editor. I can't do anything anymore. It's too terrible.

Forcibly edit with the echo command as a measure of pain. Add the name server settings to /etc/resolv.conf.

$ echo "nameserver 8.8.8.8" >> /etc/resolv.conf

Set up a mirror server for package management

Even after resolving the DNS problem, the default server says The requested URL returned error: 404 Not Found. Terrible.

For example, the exact URL is:

core:
http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/core/os/x86_64/

extra: http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/extra/os/x86_64/

Add these to /etc/pacman.d/mirrorlist. I can't use the editor, so press the echo command. Like this.

$ echo "Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/core/os/x86_64/" >> /etc/pacman.d/mirrorlist

Now you can use package management.

Installing packages such as editors on Arch Linux

With Arch Linux installed with Termux Arch, the following operations are required for package management. Displayed at startup.

Welcome to Arch Linux in Termux!
Install a package: pacman -S package
More information: pacman -[D|F|Q|R|S|T|U]h
Search packages: pacman -Ss query
Upgrade packages: pacman -Syu

But these are for 64bit. There are packages like jdk8-openjdk, but when I try to install it says package xxx does not have a valid architecture.

It seems that the 32-bit version of the library can be used by allowing multilib in addition to core and ʻextra`, but jdk was not found there.

Summary

It seems to be useless if it is not 64bit.

Recommended Posts

I tried to use Java with Termux using Termux Arch but it didn't work
When I tried to create a project using Python on Docker with PyCharm, it didn't work, but it worked with Docker Compose.
I tried to install Docker on Windows 10 Home but it didn't work
When I tried to create a virtual environment with Python, it didn't work
I tried my best to make an optimization function, but it didn't work.
I tried to use Twitter Scraper on AWS Lambda and it didn't work.
I installed PySide2, but pyside2-uic didn't work, so I managed to do it.
Use Python from Java with Jython. I was also addicted to it.
When I tried to make a VPC with AWS CDK but couldn't make it
I tried to scrape YouTube, but I can use the API, so don't do it.
When I try to push with heroku, it doesn't work
[Git] I tried to make it easier to understand how to use git stash using a concrete example
A memorandum when I tried to get it automatically with selenium
I tried to make a todo application using bottle with python
I tried to improve the efficiency of daily work with Python
A story that didn't work when I tried to log in with the Python requests module
I tried using Amazon SQS with django-celery
I want to do it with Python lambda Django, but I will stop
I tried to implement Autoencoder with TensorFlow
I want to tweet on Twitter with Python, but I'm addicted to it
I tried to visualize AutoEncoder with TensorFlow
I tried to get started with Hy
I tried using Selenium with Headless chrome
I tried to make a calculator with Tkinter so I will write it
I tried to classify text using TensorFlow
[AWS] [GCP] I tried to make cloud services easy to use with Python
I tried to convert datetime <-> string with tzinfo using strftime () and strptime ()
I tried to implement CVAE with PyTorch
I tried using eval (a, b) for Fibonacci, but it wasn't fast
I tried to solve TSP with QAOA
[Zaif] I tried to make it easy to trade virtual currencies with Python
I tried to predict Covid-19 using Darts
I tried to use deep learning to extract the part where the plant is shown from the photo of the balcony, but it didn't work, so I will summarize the contents of trial and error. Part 2
The file edited with vim was readonly but I want to save it
When I tried to change the root password with ansible, I couldn't access it.
I tried to use Resultoon on Mac + AVT-C875, but I was frustrated on the way.
Docker x visualization didn't work and I was addicted to it, so I summarized it!
I tried to create an environment to check regularly using Selenium with AWS Fargate
I didn't understand the Resize of TensorFlow so I tried to summarize it visually.
I tried to make Kana's handwriting recognition Part 3/3 Cooperation with GUI using Tkinter
I tried to predict next year with AI
I tried to detect Mario with pytorch + yolov3
I tried to implement reading Dataset with PyTorch
I want to use MATLAB feval with python
I tried to learn logical operations with TF Learn
I tried to move GAN (mnist) with keras
I tried to save the data with discord
I tried to detect motion quickly with OpenCV
I tried to integrate with Keras in TFv1.1
I tried to synthesize WAV files using Pydub.
I tried to get CloudWatch data with Python
I tried using mecab with python2.7, ruby2.3, php7
I tried to output LLVM IR with Python
I want to use Temporary Directory with Python2
I tried to detect an object with M2Det!
I tried to automate sushi making with python
I don't want to use -inf with np.log
I tried to predict Titanic survival with PyCaret
I want to use ip vrf with SONiC
I tried to operate Linux with Discord Bot
I tried to study DP with Fibonacci sequence