According to doc:
Why do I keep getting a ‘/bin/sh bad interpreter’ error?
This error is thrown due to access script interpreter at nonexistent
location.Termux does not have common directories like /bin, /sbin, /usr/bin at
their standard place. There is an exception for certain devices where
/bin is a symbolic link to /system/bin, but that does not make a
difference.Interpreters should be accessed at this directory only:
/data/data/com.termux/files/usr/bin
There are three ways to fix this:
- Install termux-exec by using pkg install termux-exec. It won’t affect the current session, but after a restart should work without
any setup. Not needed if your Termux is up to date. If still not
working, try the next workaround.- Use command termux-fix-shebang to fix the shebang line of specified file.
- Use termux-chroot from package proot to setup a chroot environment mimicking a normal Linux file system in Termux.
termux-fix-shebang my_script.py
of second method work for me, which it modify the shebang(first line of my_script.py
) from #!/usr/bin/env python
to #!/data/data/com.termux/files/usr/bin/env python
. Since /usr/bin/
is not exist in Android, that’s why it throws the error /usr/bin/env: bad interpreter: No such file or directory
. The other solution is run with python my_script.py
, neither of my_script.py
nor ./my_script.py
.
In my test, termux-exec
of the first method only work if I added correct shebang in main script(child OR child of child script no need) and ran command export LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
.
And for the issue of this question, error shows /usr/bin/env
in the middle with /data/data/com.termux/files/usr/bin/wp
even though the shebang of script #!/data/data/com.termux/files/usr/bin/bash
looks ok, it means that wp
command (located at /data/data/com.termux/files/usr/bin/wp
) used inside the script contains shebang #!/usr/bin/env wp
and should modify it to #!/data/data/com.termux/files/usr/bin/env wp
too. termux-exec
of first method should fix this specific case too(already has correct shebang in main script).
Environment
Please provide:
- Bettercap 2.19
- android 6.0.1 aarch64 processor
- device redmi note 3 sd edition
- Go version go1.12 android/arm64
- used commands mentioned here: https://www.bettercap.org/installation/ to compile from source on android
Steps to Reproduce
-pkg install root-repo
-pkg install golang git libpcap-dev libusb-dev
-go get -u github.com/bettercap/bettercap
**Expected behavior: to compile and move executable to go/bin folder
**Actual behavior:i got this error
— /home/builder/.termux-build/_cache/19b-aarch64-21-v1/bin/aarch64-linux-android-pkg-config —cflags — libusb-1.0
/home/builder/.termux-build/_cache/19b-aarch64-21-v1/bin/aarch64-linux-android-pkg-config: fork/exec /home/builder/.termux-build/_cache/19b-aarch64-21-v1/bin/aarch64-linux-android-pkg-config: no such file or directory
…….
i was on version 2.11 or 2.9 — actually i can’t remember — for a while it compiled successfully on the same device the same os.
i just made an acc. to find solution for this prob. help will be greatly appreciated
Используя расширенные root-права не получается сохранить exe файл (ошибка «No such file or directory»), при сохранении использую адрес: storage/emulated/0/name.exe. Кто знает точную проблему — пишите, мне кажется, что что-то не так в пути к файлу (директория нахождения/сохранения).
Подписаться (1) 5 586
Лучший ответ
Вам само название ошибки говорит о том, что конкретно не правильно — “такого пути просто не существует”. Перепроверьте всю иерархию нахождения папок внутри друг друга от самой первой до той, где конечный файл. Проблема в названии папок — также причина ошибки. Или просто укажите реально существующую корневую папку.
Ответы на вопрос (1)
Для того, чтобы сохранение в Termux проходило всегда гладко, проделайте пару простых действий вот так:
1. Отредактируйте файл bash.bashrc, расположенный здесь: /data/data/com.termux/files/usr/etc/bash.bashrc используя nano или любой другой текстовый редактор → Команда: nano/data/data/com.termux/files/usr/etc/bash.bashrc
2. Добавьте эту строку в конец файла → Добавить: cd ~/storage/shared/Android/data/com.dropbox.android/files/ u1407419/scratch/org
3. Перезапустите терминал, и вы увидите, что он всегда открывается в нужном вам каталоге!
Статьи на тему
-
#2
я уже давно писал, что не надо извращаться с такой установкой.
Все гораздо проще:
apt update && apt upgrade -y
Далее нужно включить в репозитории нестабильные пакеты:
apt install unstable-repo
Устанавливаем Metasploit:
apt install metasploit
Запуск стандартный:
msfconsole
Последнее редактирование модератором: 09.02.2020
HappyGamerTV667788
-
#3
я уже давно писал, что не надо извращаться с такой установкой.
Все гораздо проще:apt update & apt upgrade -y
Далее нужно включить в репозитории нестабильные пакеты:
apt install unstable-repoУстанавливаем Metasploit:
apt install metasploitЗапуск стандартный:
msfconsole
Спасибо, проверю
-
#4
я уже давно писал, что не надо извращаться с такой установкой.
Все гораздо проще:apt update && apt upgrade -y
Далее нужно включить в репозитории нестабильные пакеты:
apt install unstable-repoУстанавливаем Metasploit:
apt install metasploitЗапуск стандартный:
msfconsole
Не работает.
Код:
$ apt install unstable-repo
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package unstable-repo
$ apt install metasploit
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package metasploit
Подскажешь чего на этот счет?
-
#5
Не работает.
Код:
$ apt install unstable-repo Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package unstable-repo $ apt install metasploit Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package metasploit
Подскажешь чего на этот счет?
все работает
надо писать pkg install, а не apt install
-
Screenshot_2020-04-15-12-56-30-298_com.termux.jpg
306,4 КБ
· Просмотры: 416
Последнее редактирование: 15.04.2020
-
#6
все работает
надо писать pkg install, а не apt install
Ситуация таже.
Говорю же, я многое испробовал.
Вопрос решил. Если кому-то интересно, пишите в лс.
В случае актуальности вопроса, напишу статью по решению данной проблемы.
-
#7
Ситуация таже.
Говорю же, я многое испробовал.Вопрос решил. Если кому-то интересно, пишите в лс.
В случае актуальности вопроса, напишу статью по решению данной проблемы.
Помоги мне решить проблему. Проблема такая же как у тебя
-
#8
Ситуация таже.
Говорю же, я многое испробовал.Вопрос решил. Если кому-то интересно, пишите в лс.
В случае актуальности вопроса, напишу статью по решению данной проблемы.
как ты решил
-
#9
Попробуте включить VPN и все установку заново с включеным VPN провести.
Мне помогло, а так тоже долго парился с установкой.
Попробуте включить VPN и все установку заново с включеным VPN провести.
Мне помогло, а так тоже долго парился с установкой.
-
#10
Не работает E: Unable to locate package metasploit как решить
Go to termux
r/termux
r/termux
Official Reddit community of Termux project. Share your Termux configuration, custom utilities and usage experience or help others troubleshoot issues.
Members
Online
•
by
Ivan2k3
Why does it say «no such file or directory»? I have install all basic commands and packages please help me thanks
Archived post. New comments cannot be posted and votes cannot be cast.