Comments (31)
Let me know if the following steps help :
- If you installed TermuxArch from this repository, simply do a refresh after updating (
git pull
). If not run the following commands in termux :
$ git clone https://github.com/TermuxArch/TermuxArch && cd TermuxArch
$ bash setupTermuxArch.sh re
(Run full refresh
instead of re
if required)
-
Exit TermuxArch and restart Termux.
-
Login as a user (which you created using
addauser
) with the commandstartarch u <user>
-
Execute the command
bash $HOME/bin/makefakeroot-tcp.bash
from termuxarch.
This picture contains what is the error I faced after successful cloning (git clone https://github.com/TermuxArch/TermuxArch && cd TermuxArch)
N.B: I did "rm -r /root/arch/tmp" and removed this folder but the same error continued.
And the same error occurred when I replaced "r" with "re" or "refresh"
Q: Will everthing work normally when I uninstall TermuxArch by "bash setupTermuxArch.sh purge" and reinstall TermuxArch again with "bash setupTermuxArch.sh"? And will it be updated and ready use?
Also when I use "startarch c addauser user" it gives me this:
/bin/bash: addauser: command not found
Please help?
from termuxarch.
I think you just attempted to refresh a TermuxArch proot instance inside a TermuxArch proot environment, hence the error. This must absolutely not be run inside the proot environment but instead, should be cloned and refreshed outside the archlinux proot (in Termux).
from termuxarch.
@petkar
Okay, This is what I get in Termux itself:
from termuxarch.
Try rm -rf TermuxArch
and then the same command. Could you also try restarting termux and deleting the directory.
from termuxarch.
N.B: of course termux storage permission is ready from device setting.
from termuxarch.
I'm not aware of why the directory isn't being removed due to lack of information but you could just cd into it and run git pull
to update it and proceed with the refresh. Note that if you're running re
after refresh
, you have to exit out of the proot environment.
from termuxarch.
@petkar
Okay
It asked me define what I want to "pull", this is the result
from termuxarch.
@petkar
I used these commands in Termux itself and sucessfully updated TermuxArch to 2.0.229
chmod 777 TermuxArch
Then rm -rf TermuxArch
Then git clone https://github.com/TermuxArch/TermuxArch && cd TermuxArch
Then bash setupTermuxArch.sh re
Many thanks
from termuxarch.
@petkar
Now about the new issue:
I can add users in TermuxArch by other methods like "sudo useradd -m", but you and @SDRausty always advice on creating the user using "addauser" command
from termuxarch.
I'm not sure of the version of the local clone. For all sanity purpose try cd ~ && mkdir git-repo && cd git-repo && git clone https://github.com/TermuxArch/TermuxArch && cd TermuxArch && bash setupTermuxArch.sh refresh
. This must be executed in termux of course.
from termuxarch.
but you and @SDRausty always advice on creating the user using "addauser" command
The addauser command is a script that uses useradd and also performs additional configurations like copying profile information and local binaries and scripts that may be useful, one of which is the makefakeroot-tcp.bash.
from termuxarch.
I'm not sure of the version of the local clone. For all sanity purpose try
cd ~ && mkdir git-repo && cd git-repo && git clone https://github.com/TermuxArch/TermuxArch && cd TermuxArch && bash setupTermuxArch.sh refresh
. This must be executed in termux of course.
Should I try to full refresh TermuxArch to use "addauser" command?
Now I already have the latest TermuxArch (2.0.229).
Is there anyway to be able to use "addauser" command wothout full refresh?
from termuxarch.
Should I try to full refresh TermuxArch to use "addauser" command?
This is not necessary if you have refreshed to the latest version. Simply run startarch
to enter the proot as the root user. Executing addauser user
inside the ArchLinux proot should configure the creation of the new user correctly. Setting up passwd user
and installing sudo
before proceeding to login as the user is recommended. Also, test if sudo is working correctly by using su - user
and executing a command with sudo. Later, you can login to the user from termux with the command startarch u user
from termuxarch.
@petkar
TermuxArch doesn't recognize this command (addauser) at all:
from termuxarch.
Does the bin
folder exist in the root directory? Is the .profile
and .bash_profile
sourced? If not, you might have to run refresh
and re
again.
from termuxarch.
Executing addauser user inside the ArchLinux proot
After googling this, I think there is something called "Archlinux proot" which I have to set it up before I can use "addauser" command.
By using this after cloning TermuxArch again:
bash setupTermuxArch.sh re ar
Am I right?
from termuxarch.
Does the
bin
folder exist in the root directory? Is the.profile
and.bash_profile
sourced? If not, you might have to runrefresh
andre
again.
How do I know they are out there or not?
Iam a beginner, thank you for your patience.
from termuxarch.
How do I know they are out there or not?
ls -la /root
should list all the files (including hidden) that exist in the home directory of the root user.
from termuxarch.
How do I know they are out there or not?
ls -la /root
should list all the files (including hidden) that exist in the home directory of the root user.
Then yes I have bin folder and those two files in /root directory.
from termuxarch.
Not sure why it isn't in path. Maybe something got messed. A refresh should fix it. However you can directly execute it by calling its full path like /root/bin/addauser username
inside the Linux environment with the root user account.
from termuxarch.
@petkar @SDRausty
I Successfully created a user by addauser and ran this:
bash $HOME/bin/makefakeroot-tcp.bash
N.B: I didn't think that '/bin/makepkg' has been updated, I think this error because I updated '/bin/makepkg' from makepkg.zip file @SDRausty posted here:
SDRausty/TermuxArch#38 (comment)
Why the refresh process of TermuxArch doesn't refresh this file?
I also updated pacman by pacman -S pacman, if this could make any difference?
from termuxarch.
Yaaaaaaaaaaah 🥳🥳🥳🥳🥳
Successfully installed fakeroot-tcp after spending 2 weeks trying to do it.
The problem was that refershment of TermuxArch copy /bin files to an old user which I created in wrong way (not by addauser)
What I did after referhment and login with my username (by startarch u username), that I run this:
cp /root/bin/* /bin
Which copied the updated files to my correct username, then I ran this:
bash $HOME/bin/makefakeroot-tcp.bash
And everything done and success.
All thank to @petkar and on the first place to @SDRausty.
from termuxarch.
You are welcome; Many people have contributed to help this project to work as desired on device. You might be surprised @sobaee. You are a contributor to the project now too. Thank you!
from termuxarch.
installed fakeroot-tcp after spending 2 weeks trying to do it.
Have you noticed that makefakeroot-tcp.bash
is suddenly broken? It stops at ==> Entering fakeroot environment...!
which has a serious effect on makeyay.bash
's ability to install and use yay
. Do not update your installation if yay
is still working properly on your smartphone!
You can help with this if you have enough space on your device by installing a second copy of Arch Linux in an alternate root directory to see if yay
still works in a new side by side with the old Arch Linux installation. This can be easily done with setupTermuxArch.bash install customdir
. From verbose help with the command: setupTermuxArch.bash h
:
[i[nstall] [customdir]] Install Arch Linux in a custom directory. Instructions: Install in userspace. The HOME directory is appended to the installation directory. To install Arch Linux in HOME/customdir use `bash setupTermuxArch.bash install customdir`. In the BASH shell you can use `./setupTermuxArch.bash install customdir`. All options can be abbreviated to one, two and three letters. Hence `./setupTermuxArch.bash install customdir` can be run as `./setupTermuxArch.bash i customdir` in BASH.
I have spent hours trying to figure out why it does not work as desired since yesterday. Maybe you will run into an easy fix with this unlucky situation @sobaee?
from termuxarch.
Can confirm, just uninstalled fakeroot-tcp and installed fakeroot instead to test it out and it seems to be breaking at "Entering fakeroot environment" as you said. Will definitely try to determine the cause and troubleshoot the issue.
from termuxarch.
I seem to have figured out the problem. Did you happen to change the $PATH variable anytime recently or made any commits that might have indirectly affected the $PATH variable? What I observed is that /usr/bin
happens to come before /usr/local/bin
in the path variable at the moment and it seems to be calling the makepkg
binary present in /usr/bin
(which probably isn't working because it got updated and replaced). The modified one (/usr/local/makepkg
) isn't being called because it comes after /usr/bin
in the PATH variable and the update-proofing seems to be useless now. I'm pretty sure I remember that the /usr/local/bin
directory came first earlier (a while ago before the regression) which is also why I suggested copying the systemctl replacement script there too.
A temporary solution was the following :
- Download the diff.makepkg.zip and unzip it.
- Obtain the original makepkg binary. This can be done by either reinstalling pacman or running the following command :
patch -n -i makepkg.diff -o makepkg /bin/makepkg.<someDATEnumber>.bkp
. Note that this might not work if the.old
file was overwritten. While the DATE function prevents this, I suggest dropping it for backups as it makes it increasingly difficult to find the backup file. If you don't want to patch the .bkp file because it might be old, reinstalling pacman should suffice. However both the options should work. - Purge
fakeroot-tcp
if it exists. Installfakeroot
from pacman. - Clone
fakeroot-tcp
from aur. - Open
PKGBUILD
in an editor and navigate to theprepare()
function. You should find the patch part. Prependsudo
to it so that it looks likesudo patch ............
- Proceed to build fakeroot-tcp using
makepkg -si
It should now build correctly. However this is only a workaround. We must still find out why and when the $PATH variable might have changed.
As for the issue with _ADDpatchmakepkg_() {
:
Line 584 of archlinuxconfig.bash (6th line in the function) which is patch -n -i makepkg.diff -o makepkg /bin/makepkg
might cause issues if it is run more than once because it tries to patch the original binary the first time. On the second or subsequent times, it should be something like patch -n -i makepkg.diff -o makepkg /bin/makepkg.<someDATEnumber.bkp
. Now you see why adding DATE might be an issue to pinpoint the file? I'm sure it's still possible to call it using wildcards but makes it complicated.
However, the main cause seems to be the change in the $PATH variable.
Edit : It's 2 am now, so I'll take a break and try to fix the ADDpatchmakepkg
and the other functions and submit a pull request tomorrow. Until then, could you investigate if the path variable really did change and if so how? I could also be mistaken, so this could also be my biased assumption (that /usr/local/bin precedes /usr/bin) and take it with a grain of salt.
from termuxarch.
However, the main cause seems to be the change in the $PATH variable.
Yes, you must be correct. I was trying to balance nesting issues, and requests for Termux API commands to be accessible via PATH. I will take a closer look at PATH construction asap. It is in _ADDbash_profile_
currently. PATH can be placed in a number of places, including variable PROOTSTMNT
in file knownconfigurations.bash
.
from termuxarch.
Your insight and analysis @petkar has brought a solution asap with this b5eaf33 commit; Thank you.
from termuxarch.
Glad to hear that it was resolved! I believe the default path (hard coded path for bash in Arch) should look something like this :
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
And in the case of Termux Arch, because of the inclusion of the ~/bin
directory in home :
$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
from termuxarch.
This short fragment printf "%s\\n" "PATH=\"\$HOME/bin:\$PATH:/usr/sbin:/sbin:/bin\"" > root/.bash_profile
of code creates;
/root/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/sbin:/sbin:/bin
. It is very close to your suggestion. Thank you for sharing @petkar!
from termuxarch.
Related Issues (20)
- fresh termux install: package verification issues HOT 2
- Arch Linux and seamonkey issue solution HOT 1
- Can't copy - paste. HOT 2
- How can I use commands unique to termux? HOT 3
- Having ls error in installation HOT 2
- TermuxArch WARNING: Generated script signal 127 near or at line number 623 by '_ADDMOTD_'! Please run 'bash setupTermuxArch.bash' again or use 'bash setupTermuxArch.bash refresh'. HOT 8
- Installer interrupts wget to check the MD5 hash, and fails due to it interrupting its own download HOT 2
- Termux crashes when using chsh to change shell to startarch HOT 1
- qemu-x86_64": library "libdl.so" not found HOT 7
- Pacman failing to install new packages HOT 3
- Error: TEXDIR - Unbound Variable HOT 2
- Makeyay Command not found
- Libreoffice doesn't work. HOT 4
- termux installation crashes termux with signal 9 HOT 12
- strange messages at the end of installation. HOT 3
- Can't figure out how to get orca running. HOT 7
- accessibility for blind users? HOT 6
- Ошибка HOT 1
- How do i uninstall it? HOT 2
- Broken archlinux after update packages HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from termuxarch.