Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/usr/bin/env not found #70

Closed
tajnymag opened this issue Apr 17, 2018 · 26 comments
Closed

/usr/bin/env not found #70

tajnymag opened this issue Apr 17, 2018 · 26 comments

Comments

@tajnymag
Copy link

tajnymag commented Apr 17, 2018

I'm getting this error after freshly installing TermuxArch and running startarch:

$ startarch
proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/arch, cwd = /data/data/com.termux/files/home, $PATH=(null))
fatal error: see `proot --help`.
@SDRausty
Copy link
Owner

setupTermuxArch.sh sysinfo information is requested; Run setupTermuxArch.sh sysinfo to provide information about you device.

@SDRausty
Copy link
Owner

@tajnymag run bash setupTermuxArch.sh sysinfo to provide the requested information. The information provided is from termux-info.

@tajnymag
Copy link
Author

tajnymag commented Apr 17, 2018

Begin setupTermuxArch debug information.

`termux-info` results:

Updatable packages:
All packages up to date
System information:
Linux localhost 3.4.0-Sultan #1 SMP PREEMPT Sun Mar 11 14:47:06 PDT 2018 armv7l Android
Termux-packages arch:
arm
Android version:
7.1.2
Device manufacturer:
OnePlus
Device model:
A0001

Disk report 38179952 on /data Tue Apr 17 22:12:18 CEST 2018

BASH_VERSINFO[0] = 4
BASH_VERSINFO[1] = 4
BASH_VERSINFO[2] = 19
BASH_VERSINFO[3] = 1
BASH_VERSINFO[4] = release
BASH_VERSINFO[5] = arm-unknown-linux-androideabi

cat /proc/cpuinfo results:

Processor	: ARMv7 Processor rev 1 (v7l)
processor	: 0
BogoMIPS	: 38.40

processor	: 1
BogoMIPS	: 38.40

processor	: 2
BogoMIPS	: 38.40

processor	: 3
BogoMIPS	: 38.40

Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
CPU implementer	: 0x51
CPU architecture: 7
CPU variant	: 0x2
CPU part	: 0x06f
CPU revision	: 1

Hardware	: Qualcomm MSM8974PRO-AC
Revision	: 0000
Serial		: 0000000000000000

dpkg --print-architecture result:

arm

getprop ro.product.cpu.abi result:

armeabi-v7a

getprop ro.product.device result:

A0001

Download directory information results.

lrwxrwxrwx    1 u0_a146  u0_a146         28 Nov 28 17:15 /data/data/com.termux/files/home/storage/downloads -> /storage/emulated/0/Download
/sdcard/Download exists
/storage/emulated/0/Download exists

df /data/data/com.termux/files/home/arch results:

Filesystem            1K-blocks     Used Available Use% Mounted on
/dev/block/mmcblk0p28  57538000 19358084  38179916  34% /data

df results:

Filesystem            1K-blocks     Used Available Use% Mounted on
tmpfs                   1466544      628   1465916   1% /dev
tmpfs                   1466544        0   1466544   0% /mnt
/dev/block/mmcblk0p14   1332344   834312    498032  63% /system
/dev/block/loop0          64468     7304     57164  12% /system/etc/hosts
/dev/block/mmcblk0p28  57538000 19358084  38179916  34% /data
/dev/block/mmcblk0p16    515668     8360    507308   2% /cache
/dev/block/mmcblk0p15      4996     4232       764  85% /persist
/dev/block/mmcblk0p1      65488    57200      8288  88% /firmware
tmpfs                   1466544       12   1466532   1% /sbin
/dev/fuse              57538000 19358084  38179916  34% /storage/emulated

du -hs /data/data/com.termux/files/home/arch results:

108.0K	/data/data/com.termux/files/home/arch

ls -al /data/data/com.termux/files/home/arch results:

total 20
drwx------    3 u0_a146  u0_a146       4096 Apr 17 21:24 .
drwx------   10 u0_a146  u0_a146       4096 Apr 17 22:12 ..
drwx------    3 u0_a146  u0_a146       4096 Apr 17 21:23 root
-rwx------    1 u0_a146  u0_a146       4740 Apr 17 21:23 startarch

uname -a results:

Linux localhost 3.4.0-Sultan #1 SMP PREEMPT Sun Mar 11 14:47:06 PDT 2018 armv7l Android

End `setupTermuxArchDebug5933.log` debug information.

Post this information along with information regarding your issue at https://github.com/sdrausty/TermuxArch/issues.  Include information about input and output.  This debugging information is found in /data/data/com.termux/files/home/setupTermuxArchDebug5933.log.  If you think screenshots will help in resolving this matter better, include them in your post as well.

@SDRausty
Copy link
Owner

@tajnymag can you read what you submitted? Try again.

@tajnymag
Copy link
Author

tajnymag commented Apr 17, 2018

@SDRausty Sorry, I've updated my comment.

@SDRausty
Copy link
Owner

Use the Preview feature in the web browser to help you see what you are posting.

@SDRausty
Copy link
Owner

Uploading the file created by bash setupTermuxArch.sh sysinfo is also an option.

@SDRausty
Copy link
Owner

Much better, thank you for updating your comment.

@SDRausty
Copy link
Owner

SDRausty commented Apr 17, 2018

Run bash setupTermuxArch.sh purge, answer yes. Simply tap to choose this default yes answer. Then in a new Termux session, run bash setupTermuxArch.sh to install Arch Linux in Termux PRoot again.

Once you get to the first error, long tap > MORE > SHARE TRANSCRIPT in the Termux session window and copy and paste the output here. We know what we have, not much:

du -hs /data/data/com.termux/files/home/arch results:

108.0K	/data/data/com.termux/files/home/arch

ls -al /data/data/com.termux/files/home/arch results:

total 20
drwx------    3 u0_a146  u0_a146       4096 Apr 17 21:24 .
drwx------   10 u0_a146  u0_a146       4096 Apr 17 22:12 ..
drwx------    3 u0_a146  u0_a146       4096 Apr 17 21:23 root
-rwx------    1 u0_a146  u0_a146       4740 Apr 17 21:23 startarch

How did we get not much?

If you are new to Termux, https://termux.com/help has directions. Add a screenshot of the output if you like. When you press and momentarily hold the volumeDown+power buttons simultaneously on a smartphone, it takes a screenshot. Practice taking screenshots and copying the transcript before opening a new session and reinstalling if you want to; This may help you in creating the requested information quickly.

@tajnymag
Copy link
Author

Welcome to Termux!

Wiki:            https://wiki.termux.com
Community forum: https://termux.com/community
IRC channel:     #termux on freenode
Gitter chat:     https://gitter.im/termux/termux
Mailing list:    [email protected]

Search packages:   pkg search <query>
Install a package: pkg install <package>
Upgrade packages:  pkg upgrade
Learn more:        pkg help
$ bash setupTermuxArch.sh

 🕛 > 🕛 TermuxArch v1.6 will attempt to install Linux in /data/data/com.termux/files/home/arch.  Arch Linux in Termux PRoot will be available upon successful completion.  To run this BASH script again, use `!!`.  Ensure background data is not restricted.  Check the wireless connection if you do not see one o'clock 🕐 below.  Checking prerequisites…

 🕛 > 🕧 Prerequisites: OK  Downloading TermuxArch…

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- -  0     0    0     0    0     0      0      0 --:--:--    0     0    0     0    0     0      0      0 --:--:--  100   153  100   153    0     0     54      0  0:00:02  0:00:02 --:--:--    54
  0     0    0     0    0     0      0      0 --:--:-- -100 19416  100 19416    0     0  42672      0 --:--:-- --:--:-- --:--:--  902k

 🕛 > 🕐 TermuxArch download: OK

 🕛 > 🕜 TermuxArch v1.6 integrity: OK

 🕛 > 🕝 Detected armv7l Android operating system.

 🕛 > 🕒 Activating termux-wake-lock: DONE

 🕛 > 🕞 Contacting worldwide mirror http://mirror.archlinuxarm.org/: DONE

 🕛 > 🕓 Downloading the checksum file and ArchLinuxARM-armv7-latest.tar.gz from the geographically local mirror http://de4.mirror.archlinuxarm.org/.  If contact with the local mirror is not successful, run bash setupTermuxArch.sh again.  Should the worldwide mirror not provide another geographically nearby server after a couple of attempts, use bash setupTermuxArch.sh manual after locating a local mirror from the Internet; See bash setupTermuxArch.sh help for additional options.  Download of ArchLinuxARM-armv7-latest.tar.gz pending Internet connection:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- -100    67  100    67    0     0    340      0 --:--:-- --:--:-- --:--:--   341
  0  354M    0  1176    0     0  10990      0  9:23:11 -  0  354M    0 1069k    0     0  1056k      0  0:05:43    0  354M    0 2241k    0     0  1116k      0  0:05:24    0  354M    0 3303k    0     0  1098k      0  0:05:30    1  354M    1 4293k    0     0  1071k      0  0:05:38    1  354M    1 5394k    0     0  1076k      0  0:05:36    1  354M    1 6666k    0     0  1109k      0  0:05:26    2  354M    2 7871k    0     0  1123k      0  0:05:22    2  354M    2 9089k    0     0  1134k      0  0:05:19    2  354M    2  9.9M    0     0  1133k      0  0:05:19    3  354M    3 11.3M    0     0  1158k      0  0:05:13    3  354M    3 12.5M    0     0  1169k      0  0:05:10    3  354M    3 13.5M    0     0  1154k      0  0:05:14    4  354M    4 14.4M    0     0  1139k      0  0:05:18    4  354M    4 15.3M    0     0  1122k      0  0:05:22    4  354M    4 16.1M    0     0  1100k      0  0:05:29    4  354M    4 17.4M    0     0  1114k      0  0:05:25    5  354M    5 18.8M    0     0  1133k      0  0:05:19    5  354M    5 20.5M    0     0  1168k      0  0:05:10    6  354M    6 22.8M    0     0  1232k      0  0:04:54    7  354M    7 25.1M    0     0  1286k      0  0:04:41    7  354M    7 26.4M    0     0  1287k      0  0:04:41    7  354M    7 27.6M    0     0  1286k      0  0:04:41    8  354M    8 28.6M    0     0  1275k      0  0:04:44    8  354M    8 29.6M    0     0  1265k      0  0:04:46    8  354M    8 30.6M    0     0  1253k      0  0:04:49    8  354M    8 31.5M    0     0  1240k      0  0:04:52    9  354M    9 32.5M    0     0  1232k      0  0:04:54    9  354M    9 33.4M    0     0  1222k      0  0:04:56    9  354M    9 34.4M    0     0  1216k      0  0:04:58    9  354M    9 35.3M    0     0  1206k      0  0:05:00   10  354M   10 36.1M    0     0  1195k      0  0:05:03   10  354M   10 37.0M    0     0  1185k      0  0:05:05   10  354M   10 38.5M    0     0  1195k      0  0:05:03   11  354M   11 39.5M    0     0  1189k      0  0:05:04   11  354M   11 40.4M    0     0  1183k      0  0:05:06   11  354M   11 41.2M    0     0  1172k      0  0:05:09   11  354M   11 42.0M    0     0  1162k      0  0:05:11   12  354M   12 42.7M    0     0  1152k      0  0:05:14   12  354M   12 43.6M    0     0  1144k      0  0:05:16   12  354M   12 44.3M    0     0  1135k      0  0:05:19   12  354M   12 45.1M    0     0  1127k      0  0:05:21   12  354M   12 45.8M    0     0  1118k      0  0:05:24   13  354M   13 47.0M    0     0  1119k      0  0:05:23   13  354M   13 47.7M    0     0  1111k      0  0:05:26   13  354M   13 47.9M    0     0  1091k      0  0:05:32   13  354M   13 48.2M    0     0  1073k      0  0:05:37   13  354M   13 48.5M    0     0  1058k      0  0:05:42   13  354M   13 49.0M    0     0  1045k      0  0:05:46   14  354M   14 49.7M    0     0  1038k      0  0:05:49   14  354M   14 50.4M    0     0  1032k      0  0:05:51   14  354M   14 51.1M    0     0  1027k      0  0:05:53   14  354M   14 51.9M    0     0  1021k      0  0:05:54   14  354M   14 52.4M    0     0  1013k      0  0:05:57   14  354M   14 53.0M    0     0  1005k      0  0:06:00   15  354M   15 53.5M    0     0   997k      0  0:06:03   15  354M   15 54.1M    0     0   989k      0  0:06:06   15  354M   15 54.7M    0     0   981k      0  0:06:09   15  354M   15 55.4M    0     0   979k      0  0:06:10   15  354M   15 56.1M    0     0   974k      0  0:06:12   16  354M   16 57.0M    0     0   973k      0  0:06:12   16  354M   16 58.4M    0     0   980k      0  0:06:09   16  354M   16 60.0M    0     0   992k      0  0:06:05   17  354M   17 62.6M    0     0  1017k      0  0:05:56   18  354M   18 65.1M    0     0  1042k      0  0:05:47   19  354M   19 67.6M    0     0  1065k      0  0:05:40   19  354M   19 70.1M    0     0  1087k      0  0:05:33   20  354M   20 72.2M    0     0  1104k      0  0:05:28   20  354M   20 74.2M    0     0  1118k      0  0:05:24   21  354M   21 76.1M    0     0  1129k      0  0:05:21   21  354M   21 77.6M    0     0  1135k      0  0:05:19   22  354M   22 78.8M    0     0  1137k      0  0:05:18   22  354M   22 79.8M    0     0  1136k      0  0:05:19   23  354M   23 81.8M    0     0  1148k      0  0:05:15   23  354M   23 84.3M    0     0  1166k      0  0:05:10   24  354M   24 86.9M    0     0  1186k      0  0:05:05   24  354M   24 87.9M    0     0  1185k      0  0:05:05   25  354M   25 89.3M    0     0  1187k      0  0:05:05   25  354M   25 90.5M    0     0  1188k      0  0:05:05   26  354M   26 92.1M    0     0  1194k      0  0:05:03   26  354M   26 94.4M    0     0  1208k      0  0:05:00   27  354M   27 96.9M    0     0  1226k      0  0:04:55   28  354M   28 99.5M    0     0  1242k      0  0:04:51   28  354M   28  102M    0     0  1258k      0  0:04:48   29  354M   29  104M    0     0  1268k      0  0:04:45   29  354M   29  105M    0     0  1272k      0  0:04:45   30  354M   30  107M    0     0  1276k      0  0:04:44   30  354M   30  109M    0     0  1289k      0  0:04:41   31  354M   31  112M    0     0  1305k      0  0:04:37   32  354M   32  114M    0     0  1320k      0  0:04:34   33  354M   33  117M    0     0  1336k      0  0:04:31   33  354M   33  120M    0     0  1351k      0  0:04:28   34  354M   34  122M    0     0  1363k      0  0:04:26   35  354M   35  124M    0     0  1367k      0  0:04:25   35  354M   35  125M    0     0  1370k      0  0:04:24   36  354M   36  127M    0     0  1379k      0  0:04:22   36  354M   36  130M    0     0  1391k      0  0:04:20   37  354M   37  133M    0     0  1405k      0  0:04:18   38  354M   38  135M    0     0  1418k      0  0:04:15   39  354M   39  138M    0     0  1431k      0  0:04:13   39  354M   39  140M    0     0  1441k      0  0:04:11   40  354M   40  142M    0     0  1444k      0  0:04:11   40  354M   40  143M    0     0  1445k      0  0:04:10   41  354M   41  145M    0     0  1447k      0  0:04:10   41  354M   41  147M    0     0  1454k      0  0:04:09   42  354M   42  150M    0     0  1465k      0  0:04:07   43  354M   43  152M    0     0  1476k      0  0:04:05   43  354M   43  155M    0     0  1487k      0  0:04:03   44  354M   44  158M    0     0  1499k      0  0:04:01   45  354M   45  160M    0     0  1508k      0  0:04:00   46  354M   46  163M    0     0  1518k      0  0:03:58   46  354M   46  165M    0     0  1524k      0  0:03:57   47  354M   47  167M    0     0  1533k      0  0:03:56   48  354M   48  170M    0     0  1543k      0  0:03:54   48  354M   48  172M    0     0  1552k      0  0:03:53   49  354M   49  175M    0     0  1562k      0  0:03:52   50  354M   50  178M    0     0  1572k      0  0:03:50   51  354M   51  180M    0     0  1581k      0  0:03:49   51  354M   51  183M    0     0  1590k      0  0:03:47   52  354M   52  185M    0     0  1595k      0  0:03:47   53  354M   53  188M    0     0  1604k      0  0:03:46   53  354M   53  190M    0     0  1613k      0  0:03:44   54  354M   54  193M    0     0  1620k      0  0:03:43   55  354M   55  195M    0     0  1626k      0  0:03:43   55  354M   55  197M    0     0  1633k      0  0:03:41   56  354M   56  200M    0     0  1642k      0  0:03:40   57  354M   57  203M    0     0  1650k      0  0:03:39   58  354M   58  205M    0     0  1658k      0  0:03:38   58  354M   58  208M    0     0  1666k      0  0:03:37   59  354M   59  210M    0     0  1670k      0  0:03:37   60  354M   60  212M    0     0  1673k      0  0:03:36   60  354M   60  214M    0     0  1680k      0  0:03:35   61  354M   61  217M    0     0  1683k      0  0:03:35   61  354M   61  219M    0     0  1686k      0  0:03:35   62  354M   62  220M    0     0  1686k      0  0:03:35   62  354M   62  221M    0     0  1682k      0  0:03:35   63  354M   63  223M    0     0  1680k      0  0:03:35   63  354M   63  224M    0     0  1675k      0  0:03:36   63  354M   63  225M    0     0  1671k      0  0:03:37   63  354M   63  226M    0     0  1666k      0  0:03:37   64  354M   64  227M    0     0  1660k      0  0:03:38   64  354M   64  227M    0     0  1655k      0  0:03:39   64  354M   64  228M    0     0  1648k      0  0:03:39   64  354M   64  230M    0     0  1648k      0  0:03:40   65  354M   65  232M    0     0  1652k      0  0:03:39   66  354M   66  235M    0     0  1660k      0  0:03:38   67  354M   67  237M    0     0  1667k      0  0:03:37   67  354M   67  240M    0     0  1674k      0  0:03:36   68  354M   68  242M    0     0  1677k      0  0:03:36   68  354M   68  244M    0     0  1678k      0  0:03:36   69  354M   69  245M    0     0  1678k      0  0:03:36   69  354M   69  247M    0     0  1676k      0  0:03:36   70  354M   70  249M    0     0  1677k      0  0:03:36   71  354M   71  251M    0     0  1683k      0  0:03:35   71  354M   71  254M    0     0  1690k      0  0:03:34   72  354M   72  256M    0     0  1696k      0  0:03:33   73  354M   73  259M    0     0  1701k      0  0:03:33   73  354M   73  260M    0     0  1700k      0  0:03:33   74  354M   74  262M    0     0  1700k      0  0:03:33   74  354M   74  263M    0     0  1696k      0  0:03:33   74  354M   74  264M    0     0  1695k      0  0:03:33   75  354M   75  267M    0     0  1699k      0  0:03:33   76  354M   76  269M    0     0  1705k      0  0:03:32   76  354M   76  272M    0     0  1711k      0  0:03:31   77  354M   77  274M    0     0  1715k      0  0:03:31   77  354M   77  276M    0     0  1712k      0  0:03:31   78  354M   78  277M    0     0  1709k      0  0:03:32   78  354M   78  278M    0     0  1706k      0  0:03:32   79  354M   79  280M    0     0  1707k      0  0:03:32   79  354M   79  282M    0     0  1712k      0  0:03:31   80  354M   80  285M    0     0  1717k      0  0:03:31   81  354M   81  287M    0     0  1722k      0  0:03:30   81  354M   81  289M    0     0  1726k      0  0:03:30   82  354M   82  291M    0     0  1725k      0  0:03:30   82  354M   82  292M    0     0  1724k      0  0:03:30   83  354M   83  294M    0     0  1725k      0  0:03:30   83  354M   83  296M    0     0  1725k      0  0:03:30   84  354M   84  299M    0     0  1730k      0  0:03:29   85  354M   85  301M    0     0  1735k      0  0:03:28   85  354M   85  304M    0     0  1741k      0  0:03:28   86  354M   86  306M    0     0  1746k      0  0:03:27   87  354M   87  309M    0     0  1748k      0  0:03:27   88  354M   88  311M    0     0  1753k      0  0:03:26   88  354M   88  314M    0     0  1758k      0  0:03:26   89  354M   89  316M    0     0  1763k      0  0:03:25   90  354M   90  319M    0     0  1766k      0  0:03:25   90  354M   90  321M    0     0  1770k      0  0:03:24   91  354M   91  324M    0     0  1775k      0  0:03:24   92  354M   92  326M    0     0  1780k      0  0:03:23   93  354M   93  329M    0     0  1785k      0  0:03:23   93  354M   93  332M    0     0  1790k      0  0:03:22   94  354M   94  334M    0     0  1793k      0  0:03:22   95  354M   95  336M    0     0  1796k      0  0:03:21   95  354M   95  339M    0     0  1801k      0  0:03:21   96  354M   96  342M    0     0  1805k      0  0:03:20   97  354M   97  344M    0     0  1810k      0  0:03:20   98  354M   98  347M    0     0  1814k      0  0:03:19   98  354M   98  349M    0     0  1819k      0  0:03:19   99  354M   99  352M    0     0  1823k      0  0:03:18  100  354M  100  354M    0     0  1826k      0  0:03:18  0:03:18 --:--:-- 2691k

 🕛 > 🕠 Checking download integrity with Termux busybox md5sum.  This may take a little while:

 🕛 > 🕕 System image file download integrity: OK

 🕛 > 🕡 Uncompressing ArchLinuxARM-armv7-latest.tar.gz into /data/data/com.termux/files/home/arch.  The option to create Arch Linux system users will be available through addauser and addauserps.  Arch Linux user login from Termux with startarch is now implemented thanks to user contributions and suggestions.  See Ability for Scripts to Launch Commands for Arch Linux in Termux PRoot on Device https://github.com/sdrausty/TermuxArch/issues/54 for more information about these brand new options.  Additional features of TermuxArch are also listed at https://github.com/sdrausty/TermuxArch/releases.

While waiting, you can use df, du -hs, htop, ps, top and watch in a new Termux session to watch the uncompressing while the session completes.  Use info query and man query to learn more about your Linux system in the palm of your hand.  See The Linux Documentation Project http://tldp.org to learn more about Linux and CLI commands.  Uncompressing ArchLinuxARM-armv7-latest.tar.gz will take a long time; Be patient:
proot info: vpid 1: terminated with signal 11

 🕛 > 🕘 Cleaning up installation files: DONE

 🕛 > 🕤 Arch Linux in Termux PRoot is installed.  Configuring and updating Arch Linux 📲archsystemconfigs.sh: line 310: etc/motd: No such file or directory
archsystemconfigs.sh: line 354: etc/resolv.conf: No such file or directory
archsystemconfigs.sh: line 471: bin/we: No such file or directory
chmod: bin/we: No such file or directory
necessaryfunctions.sh: line 364: etc/locale.gen: No such file or directory
necessaryfunctions.sh: line 356: etc/locale.conf: No such file or directory
sed: /data/data/com.termux/files/home/arch/etc/pacman.d/mirrorlist: No such file or directory
sed: /data/data/com.termux/files/home/arch/etc/pacman.d/mirrorlist: No such file or directory
sed: /data/data/com.termux/files/home/arch/etc/pacman.d/mirrorlist: No such file or directory
sed: /data/data/com.termux/files/home/arch/etc/pacman.d/mirrorlist: No such file or directory

proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/arch, cwd = /data/data/com.termux/files/home/arch, $PATH=(null))
fatal error: see `proot --help`.
 🕛 > 🕙 Releasing termux-wake-lock: DONE

 🕛 > 🕥 Use startarch to launch Arch Linux in Termux PRoot.  Alternatively, run ~/arch/startarch in a BASH shell to start Arch Linux in Termux PRoot for future sessions also.

 🕛 > 🕦 startarch copied to /data/data/com.termux/files/usr/bin.

 🕛 = 🕛 Information about "Starting Arch Linux from Termux?" at https://github.com/sdrausty/TermuxArch/issues/25.  Use tour to run a short tour, and get to know the new Arch Linux in Termux PRoot environment you just set up better.  If there was more than one error during the update procedure and you would like to refresh the installation, use setupTermuxArch.sh refresh.  This will update and recreate the configuration provided.  Use the TermuxArch command keys to install and generate Arch Linux keyring keys.

Arch Linux in Termux PRoot is installed in /data/data/com.termux/files/home/arch.  This project is in active development and contributions are welcome; See https://sdrausty.github.io/TermuxArch/CONTRIBUTORS for information.  The documentation repository for TermuxArch https://sdrausty.github.io/TermuxArch/docs/ is a Termux Arch submodule that is located at https://github.com/sdrausty/docsTermuxArch.  Pull requests and contributions through the issues pages are open to improve the ux and this Termux PRoot installation script.

Use ~/arch/startarch and startarch in a BASH shell to launch Arch Linux in Termux PRoot for future sessions.  See https://wiki.archlinux.org/index.php/IRC_channel for available Arch Linux IRC channels.

proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/arch, cwd = /data/data/com.termux/files/home/arch, $PATH=(null))
fatal error: see `proot --help`.

Arch Linux in Termux PRoot is installed in /data/data/com.termux/files/home/arch.  This project is in active development and contributions are welcome; See https://sdrausty.github.io/TermuxArch/CONTRIBUTORS for information.  The documentation repository for TermuxArch https://sdrausty.github.io/TermuxArch/docs/ is a Termux Arch submodule that is located at https://github.com/sdrausty/docsTermuxArch.  Pull requests and contributions through the issues pages are open to improve the ux and this Termux PRoot installation script.

Use ~/arch/startarch and startarch in a BASH shell to launch Arch Linux in Termux PRoot for future sessions.  See https://wiki.archlinux.org/index.php/IRC_channel for available Arch Linux IRC channels.

Thank you for using setupTermuxArch.sh v1.6 🏁

@SDRausty
Copy link
Owner

@tajnymag I just attempted to reproduce the errors in a similar Android 7 environment: no error. There is one important difference however: aarch64 architecture. This may or might not have something to do with the error.

@SDRausty
Copy link
Owner

If you know some basics of BASH, you can use setupTermuxArch.sh bloom; And I can help walk you through some steps to keep the downloaded files and to try a few other options.

@SDRausty
Copy link
Owner

SDRausty commented Apr 17, 2018

@tajnymag after reviewing the information you provided, and the code once again:

  1. This f9246a4 commit should resolve this matter,
  2. This ca19338 commit will permit similar errors in the future, if encountered, to fail upon TermuxArch unpacking. Thereby omitting repetitive downloading of the image file.

EDIT: The second commit has been depreciated after testing.
EDIT2: The first commit has been depreciated after testing too.

@tajnymag
Copy link
Author

  • I've tried to use wget. Didn't help.
  • I'll try "bloom" and older, now deprecated, version of setupTermuxArch

@SDRausty
Copy link
Owner

SDRausty commented Apr 18, 2018

Commit a431bf3 adds bsdtar funtionality and depreciates busybox tar. Once tested, if passing, I'll push it to stable. If you want to test with me, uncomment L625 in setupTermuxArch.sh to look like this dfl=/gen. You will have the definitive result either way:

  1. Wait for update,
  2. Uncomment developer mode.

Enjoy 🌊⛵💦🏖🏞🏙☀

@SDRausty
Copy link
Owner

I'll try "bloom" and older, now deprecated, version of setupTermuxArch

When you run setupTermuxArch.sh from the folder setupTermuxArch.sh bloom creates, all the TermuxArch files are sourced locally. Using an older version probably will not help since one of TermuxArch's important functions is seamless Internet connection. Hence setupTermuxArch.sh always downloads and updates itself.

Alternatively, install method 2 (git cloning) provides all the functionality of setupTermuxArch.sh bloom and more, including the older versions mentioned.

Hence setupTermuxArch.sh always downloads and updates itself.

Cleanliness in the git repository was just added with version 1.6; Older versions will self-update unless they are edited not update to by hand. Instructions how to are here at issues...

@SDRausty
Copy link
Owner

SDRausty commented Apr 18, 2018

@tajnymag initial testing is finished; The result is this b99ac3c commit. It depreciates busybox tar for bsdtar on armv7 and aarch64 architectures. This may be the key for this issue.

Run bash setupTermuxArch.sh purge, answer yes. Simply tap to choose this default yes answer. Then run bash setupTermuxArch.sh to install Arch Linux in Termux PRoot again.

@tajnymag
Copy link
Author

Nope, still errors

Welcome to Termux!

Wiki:            https://wiki.termux.com
Community forum: https://termux.com/community
IRC channel:     #termux on freenode
Gitter chat:     https://gitter.im/termux/termux
Mailing list:    [email protected]

Search packages:   pkg search <query>
Install a package: pkg install <package>
Upgrade packages:  pkg upgrade
Learn more:        pkg help
$ bash setupTermuxArch.sh purge

Uninstall /data/data/com.termux/files/home/arch? [Y|n] y
Uninstalling /data/data/com.termux/files/home/arch…
Uninstalling /data/data/com.termux/files/usr/bin/startarch: nothing to do for /data/data/com.termux/files/usr/bin/startarch.
Uninstalling /data/data/com.termux/files/home/bin/startarch: nothing to do for /data/data/com.termux/files/home/bin/startarch.
Uninstalling /data/data/com.termux/files/home/arch: nothing to do for /data/data/com.termux/files/home/arch.
Uninstalling /data/data/com.termux/files/home/arch: Done

Thank you for using setupTermuxArch.sh v1.6 🏁

$ bash setupTermuxArch.sh

 🕛 > 🕛 TermuxArch v1.6 will attempt to install Linux in /data/data/com.termux/files/home/arch.  Arch Linux in Termux PRoot will be available upon successful completion.  To run this BASH script again, use `!!`.  Ensure background data is not restricted.  Check the wireless connection if you do not see one o'clock 🕐 below.  Checking prerequisites…

 🕛 > 🕧 Prerequisites: OK  Downloading TermuxArch…

setupTermuxAr 100%     153  --.-KB/s    in 0s
setupTermuxAr 100%  18.98K  --.-KB/s    in 0.005s

 🕛 > 🕐 TermuxArch download: OK

setupTermuxArch.sh: UPDATED
TermuxArch: RESTARTED

 🕛 > 🕛 TermuxArch v1.6 will attempt to install Linux in /data/data/com.termux/files/home/arch.  Arch Linux in Termux PRoot will be available upon successful completion.  To run this BASH script again, use `!!`.  Ensure background data is not restricted.  Check the wireless connection if you do not see one o'clock 🕐 below.  Checking prerequisites…

Installing bsdtar…

Hit:1 https://termux.net stable InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libarchive libxml2
The following NEW packages will be installed:
  bsdtar libarchive libxml2
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 669 kB of archives.
After this operation, 1618 kB of additional disk space will be used.
Get:1 https://termux.net stable/main arm libxml2 arm 2.9.8 [394 kB]
Get:2 https://termux.net stable/main arm libarchive arm 3.3.2 [236 kB]
Get:3 https://termux.net stable/main arm bsdtar arm 3.3.2 [39.4 kB]
Fetched 669 kB in 1s (343 kB/s)
Selecting previously unselected package libxml2.
(Reading database ... 9252 files and directories currently installed.)
Preparing to unpack .../archives/libxml2_2.9.8_arm.deb ...
Unpacking libxml2 (2.9.8) ...
Selecting previously unselected package libarchive.
Preparing to unpack .../libarchive_3.3.2_arm.deb ...
Unpacking libarchive (3.3.2) ...
Selecting previously unselected package bsdtar.
Preparing to unpack .../archives/bsdtar_3.3.2_arm.deb ...
Unpacking bsdtar (3.3.2) ...
Setting up libxml2 (2.9.8) ...
Setting up libarchive (3.3.2) ...
Setting up bsdtar (3.3.2) ...

Installing bsdtar: DONE

 🕛 > 🕧 Prerequisites: OK  Downloading TermuxArch…

setupTermuxAr 100%     153  --.-KB/s    in 0s
setupTermuxAr 100%  18.98K  --.-KB/s    in 0.02s

 🕛 > 🕐 TermuxArch download: OK

 🕛 > 🕜 TermuxArch v1.6 integrity: OK

 🕛 > 🕝 Detected armv7l Android operating system.

 🕛 > 🕒 Activating termux-wake-lock: DONE

 🕛 > 🕞 Contacting worldwide mirror http://mirror.archlinuxarm.org/: DONE

 🕛 > 🕓 Downloading the checksum file and ArchLinuxARM-armv7-latest.tar.gz from the geographically local mirror http://eu.mirror.archlinuxarm.org/.  If contact with the local mirror is not successful, run bash setupTermuxArch.sh again.  Should the worldwide mirror not provide another geographically nearby server after a couple of attempts, use bash setupTermuxArch.sh manual after locating a local mirror from the Internet; See bash setupTermuxArch.sh help for additional options.  Download of ArchLinuxARM-armv7-latest.tar.gz pending Internet connection:

 🕛 > 🕞 Contacting worldwide mirror http://mirror.archlinuxarm.org/: DONE

 🕛 > 🕓 Downloading the checksum file and ArchLinuxARM-armv7-latest.tar.gz from the geographically local mirror http://de6.mirror.archlinuxarm.org/.  If contact with the local mirror is not successful, run bash setupTermuxArch.sh again.  Should the worldwide mirror not provide another geographically nearby server after a couple of attempts, use bash setupTermuxArch.sh manual after locating a local mirror from the Internet; See bash setupTermuxArch.sh help for additional options.  Download of ArchLinuxARM-armv7-latest.tar.gz pending Internet connection:

ArchLinuxARM- 100%      67  --.-KB/s    in 0s
ArchLinuxARM- 100% 354.17M  2.25MB/s    in 2m 34s

 🕛 > 🕞 Contacting worldwide mirror http://mirror.archlinuxarm.org/: DONE

 🕛 > 🕓 Downloading the checksum file and ArchLinuxARM-armv7-latest.tar.gz from the geographically local mirror http://de6.mirror.archlinuxarm.org/.  If contact with the local mirror is not successful, run bash setupTermuxArch.sh again.  Should the worldwide mirror not provide another geographically nearby server after a couple of attempts, use bash setupTermuxArch.sh manual after locating a local mirror from the Internet; See bash setupTermuxArch.sh help for additional options.  Download of ArchLinuxARM-armv7-latest.tar.gz pending Internet connection:


 🕛 > 🕠 Checking download integrity with Termux busybox md5sum.  This may take a little while:

 🕛 > 🕕 System image file download integrity: OK

 🕛 > 🕡 Uncompressing ArchLinuxARM-armv7-latest.tar.gz into /data/data/com.termux/files/home/arch.  The option to create Arch Linux system users will be available through addauser and addauserps.  Arch Linux user login from Termux with startarch is now implemented thanks to user contributions and suggestions.  See Ability for Scripts to Launch Commands for Arch Linux in Termux PRoot on Device https://github.com/sdrausty/TermuxArch/issues/54 for more information about these brand new options.  Additional features of TermuxArch are also listed at https://github.com/sdrausty/TermuxArch/releases.

While waiting, you can use df, du -hs, htop, ps, top and watch in a new Termux session to watch the uncompressing while the session completes.  Use info query and man query to learn more about your Linux system in the palm of your hand.  See The Linux Documentation Project http://tldp.org to learn more about Linux and CLI commands.  Uncompressing ArchLinuxARM-armv7-latest.tar.gz will take a long time; Be patient:
proot info: vpid 1: terminated with signal 11

 🕛 > 🕘 Cleaning up installation files: DONE

 🕛 > 🕤 Arch Linux in Termux PRoot is installed.  Configuring and updating Arch Linux 📲archsystemconfigs.sh: line 310: etc/motd: No such file or directory
archsystemconfigs.sh: line 354: etc/resolv.conf: No such file or directory
archsystemconfigs.sh: line 471: bin/we: No such file or directory
chmod: bin/we: No such file or directory
necessaryfunctions.sh: line 365: etc/locale.gen: No such file or directory
necessaryfunctions.sh: line 357: etc/locale.conf: No such file or directory
sed: /data/data/com.termux/files/home/arch/etc/pacman.d/mirrorlist: No such file or directory
sed: /data/data/com.termux/files/home/arch/etc/pacman.d/mirrorlist: No such file or directory
sed: /data/data/com.termux/files/home/arch/etc/pacman.d/mirrorlist: No such file or directory
sed: /data/data/com.termux/files/home/arch/etc/pacman.d/mirrorlist: No such file or directory

proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/arch, cwd = /data/data/com.termux/files/home/arch, $PATH=(null))
fatal error: see `proot --help`.
 🕛 > 🕙 Releasing termux-wake-lock: DONE

 🕛 > 🕥 Use startarch to launch Arch Linux in Termux PRoot.  Alternatively, run ~/arch/startarch in a BASH shell to start Arch Linux in Termux PRoot for future sessions also.

 🕛 > 🕦 startarch copied to /data/data/com.termux/files/usr/bin.

 🕛 = 🕛 Information about "Starting Arch Linux from Termux?" at https://github.com/sdrausty/TermuxArch/issues/25.  Use tour to run a short tour, and get to know the new Arch Linux in Termux PRoot environment you just set up better.  If there was more than one error during the update procedure and you would like to refresh the installation, use setupTermuxArch.sh refresh.  This will update and recreate the configuration provided.  Use the TermuxArch command keys to install and generate Arch Linux keyring keys.

Arch Linux in Termux PRoot is installed in /data/data/com.termux/files/home/arch.  This project is in active development and contributions are welcome; See https://sdrausty.github.io/TermuxArch/CONTRIBUTORS for information.  The documentation repository for TermuxArch https://sdrausty.github.io/TermuxArch/docs/ is a Termux Arch submodule that is located at https://github.com/sdrausty/docsTermuxArch.  Pull requests and contributions through the issues pages are open to improve the ux and this Termux PRoot installation script.

Use ~/arch/startarch and startarch in a BASH shell to launch Arch Linux in Termux PRoot for future sessions.  See https://wiki.archlinux.org/index.php/IRC_channel for available Arch Linux IRC channels.

proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/arch, cwd = /data/data/com.termux/files/home/arch, $PATH=(null))
fatal error: see `proot --help`.

Arch Linux in Termux PRoot is installed in /data/data/com.termux/files/home/arch.  This project is in active development and contributions are welcome; See https://sdrausty.github.io/TermuxArch/CONTRIBUTORS for information.  The documentation repository for TermuxArch https://sdrausty.github.io/TermuxArch/docs/ is a Termux Arch submodule that is located at https://github.com/sdrausty/docsTermuxArch.  Pull requests and contributions through the issues pages are open to improve the ux and this Termux PRoot installation script.

Use ~/arch/startarch and startarch in a BASH shell to launch Arch Linux in Termux PRoot for future sessions.  See https://wiki.archlinux.org/index.php/IRC_channel for available Arch Linux IRC channels.

Thank you for using setupTermuxArch.sh v1.6 🏁

$ startarch
proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/arch, cwd = /data/data/com.termux/files/home, $PATH=(null))
fatal error: see `proot --help`.
$

@tajnymag
Copy link
Author

I'll look into it properly tomorrow/on Friday. It might be something on my side, though I haven't found it yet.

@SDRausty
Copy link
Owner

SDRausty commented Apr 18, 2018

Commit 90b7c6b reimplements rmarchq () which displays the following when the installation directory $installdir exists, eliminating the need to use setupTermuxArch.sh purge:

TermuxArch: DIRECTORY WARNING!  /data/data/com.termux/files/home/arch/ directory detected.  Termux Arch installation shall continue.  If in doubt, answer yes.

Uninstall /data/data/com.termux/files/home/arch? [Y|n]

When the installation directory exits, tapping enter will choose the default yes answer, which in our case is highly recommended; since this will give us a clean start. Instructions about using setupTermuxArch.sh purge are now automated. However, we are stuck with a question. Function rmarchq () may be depreciated in the future once again.

@tajnymag
Copy link
Author

Cool. That will help new users 👍

@SDRausty
Copy link
Owner

Commit 2730f3a reimplements busybox tar for armv7 and aarch64 architectures trimming the installation Termux prerequisites downloads for these architectures by one - bsdtar. Thanks for the quick update @tajnymag.

@SDRausty
Copy link
Owner

SDRausty commented Apr 18, 2018

Cool. That will help new user 👍

Possibly, probably not, by this I mean it doesn't really matter whether it's off.

Edit: after extensive testing, it does matter. Downloading the image and refreshing the install does generate errors in the end.

It does matter when it's on. If a new user is unaware and reinstalls Arch Linux in Termux PRoot, it should not matter much whether they forgot that they might have done so already; and do it again by mistake. Overlaying a brand new system should not matter much when the system is brand new. When it is older, errors will probably occur. We are doing something is a little more interesting than simply installing, we are debugging the installation process.

Since overlaying the system may matter, but may not even when it is brand new, we want this variable out of the equation. That's why I was asking to use the purge function manually before, which is still current. bash setupTermuxArch.sh purge is a very powerful option. If the user miss uses it, even though there are fail safes, the consequences within Termux can be severe. By miss uses, I mean someone is playing with the script to see how it fails and similar. This is part of debugging too. That's one of the methods how the fail safe functions were made.

Our interactions, and the fact that I also want to gauge the UX (user experience) with this function when it is on by default a little more are why it is back on at present. Thanks for the positive feedback. It shall probably go back to off in the future:

If the user doesn't know, and it doesn't make a difference for the regular user, and it does make a difference in the seamlessness the user experiences = This is why function rmarchq () is off by default.

In a scenario when the download is interrupted for some reason, for example on a slow connection, and setupTermuxArch.sh is run again, it seems more seamless to have this function off by default. TermuxArch is supposed to pick up where it stopped. This is very important on a slow connection when it takes a long time for the download to complete. The answer to this decision is made for the user. Resume the download from where it stopped. I am almost 100% sure that this question should be off by default.

Possibly this question should be on by default as you stated, but you might change your mind later; And I might change my mind about this topic as well. Possibly the function wants expansion; More information for the user to make a sound judgemental decision without confusing the user. One of the design goals of TermuxArch is no setup required, similar to Termux. Hence a judgemental question is out of the question for this goal to be fulfilled.

Either way, while debugging the setup process, this change will automate the process a little more for both of us while we are working on this open issue. I propose using this comment window as a voting for this feature on or off. Use as many emojis as you like. Two emojis and two types of votes are defined. The other emojis are undefined. If you choose to, define an emoji and its' vote meaning equivalent, or use it with it's default definition. I have chosen as many emojis as possible to start us off with the amazing possibilities of voting at GitHub for a script feature..

Screenshot of TermuxArch with Function rmarchq () in Action:

screenshot_2018-04-19-01-51-41

Use the GitHub emoji function to vote if you want function rmarchq () on or off by default:

👍 on by default

👎 off by default

Variance between the total numbers of votes shall be used as criteria for change from off by default. Total number of votes in each category shall also be criteria. Another words: no votes = no change for default status.

Current function status : on
Current function default : off

@pigeon2049
Copy link

same problem with you on android oreo

proot error: execve("/usr/bin/env"): No such file or directory proot info: It seems that termux-exec is active and is prepending /data/data/com.termux/... to executable paths If this is path is not available inside proot, please "unset LD_PRELOAD" fatal error: see proot --help. proot error: can't chmod '/data/data/com.termux/files/usr/tmp//proot-7158-fxZbkm': No such file or directory

when unzipping linux files it shows

Ignoring unknown extended header keyword 'SCHILY.fflags' after each commands

@SDRausty
Copy link
Owner

SDRausty commented Apr 19, 2018

@soulzzz can you help us resolve Oreo? Issue #74 is for Android 8 and wants more information about your device. Use bash setupTermuxArch.sh sysinfo to provide the requested information at #74.

Issue termux/proot#13 is a topic regarding Android 8 PRoot. Repost your comments there. You might want to try to organize what we want so we can assist as effectively as possible. Input and output are imperative. Since you are here, I can presume your input. Output is imperative. Don't be too bashful to post an attractive text wall at TermuxArch. Actually the request is for two of them at present. You might not notice the tiny bit of information. Hopefully one of us will find the solution to these pesky Android 8 issues. Ready:

  1. Share your system information. It is precious for us at present. link : Android 8 System Information : bash setupTermuxArch.sh sysinfo #74
  2. Share your error with at least one upstream. Repost what you shared at Assertion "IS_IN_SYSENTER(tracee)"  termux/proot#13 this issue is now also your issue since you have an Oreo.

Do you know a little bit about BASH scripting? Which method are you using to install? bash setupTermuxArch.sh sysinfo information is requested in this thread. The more we know, be better we can help in finding an answer. Post bash setupTermuxArch.sh output right here in this thread and sysinfo output at #74 Both are important to continue. If you have more output, share. Can you run the entire setup from start and post the output here?

@SDRausty
Copy link
Owner

SDRausty commented Apr 22, 2018

@soulzzz we have begun debugging Android 8 and PRoot upstream. Can you post the output for:

#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
int main() {
	int a = open("nonexistent-test-file-a", O_RDONLY);
	int ae = errno;
	int b = open("nonexistent-test-dir/nonexistent-test-file-b", O_RDONLY);
	int be = errno;
	int c = open("nonexistent-test-file-c", O_RDONLY);
	int ce = errno;
	printf("[%d %d %d %d %d %d]\n", a, ae, b, be, c, ce);
}
clang testapp.c -o testapp
PROOT_NO_SECCOMP=1 proot ./testapp

at Assertion "IS_IN_SYSENTER(tracee)" ? This ed9464c commit adds this test to the TermuxArch repository. Run ktest.sh to produce a result like this one:

$ PROOT_NO_SECCOMP=1 proot ./testapp
[-1 2 -1 2 -1 2]

We want these test results to improve the Android 8 user experience with Termux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants