Closed NurTasin closed 8 months ago
this is because of termux's pkg
, which is an apt
wrapper.
[pkg] performs a number of tasks:
- Provides command shortcuts. Use "pkg in" instead of "pkg install" or "apt install".
- Automatically runs "apt update" before installing a package if necessary.
- Performs some client side repository load-balancing by automatically switching mirrors on a regular basis. That is important to prevent us hitting quota limit on hosting.
this is because of termux's
pkg
, which is anapt
wrapper.[pkg] performs a number of tasks:
- Provides command shortcuts. Use "pkg in" instead of "pkg install" or "apt install".
- Automatically runs "apt update" before installing a package if necessary.
- Performs some client side repository load-balancing by automatically switching mirrors on a regular basis. That is important to prevent us hitting quota limit on hosting.
I know that. But will it work if I just remove pkg (apt wrapper) and then try to install pkg?
@NurTasin you can install pkg locally and then run it with npx:
npx pkg <whatever>
What version of pkg are you using?
I was unable to install it and that is my problem
What version of Node.js are you using?
v18.13.0
What operating system are you using?
Android (Termux)
What CPU architecture are you using?
arm64
What Node versions, OSs and CPU architectures are you building for?
node18-arm64
Describe the Bug
I was trying to install pkg on my Android Phone using Termux. It already has a binary named
pkg
(used to install packages, just like apt) . So when I try to install this pkg usingnpm install pkg
the following error pops up saying that a binary with same name already exists.I tried to install it with an alias like
npm install -g jspkg@npm:pkg
but the same thing happend. What should I do? I want my js code to be ran on termux. NOTE: I can't use--force
to overwrite the binary as It is needed to install many packages within termux.Expected Behavior
I kind of expected this error. But are there any work arround to this? I am sure that some other distros also use pkg as their system package manager.
To Reproduce
Here I tried to install it normally
And here I tried to install it with an alias