holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.73k stars 117 forks source link

can't use pkg to install anything #830

Open Mrlaolu opened 1 month ago

Mrlaolu commented 1 month ago
[~/Documents]$ pkg install git
Package git not found
[~/Documents]$ pkg install llvm-18
Package llvm-18 not found

env:

CFFIXED_USER_HOME=/private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5
HOME=/private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5
TMPDIR=/private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/
XPC_SERVICE_NAME=UIKitApplication:AsheKube.app.a-Shell[cb59][rb-legacy]
PATH=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/perl5/bin:/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/bin:/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/Library/bin:/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/Library/bin3:/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library/bin:/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/bin:/usr/bin:/bin:/usr/sbin:/sbin
XPC_FLAGS=0x0
LOGNAME=mobile
USER=mobile
SHELL=/bin/sh
__CF_USER_TEXT_ENCODING=0x1F5:0:0
APPDIR=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app
PATH_LOCALE=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents
TERM=xterm
CLICOLOR=1
LSCOLORS=ExFxBxDxCxegedabagacad
SSH_HOME=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents
DIG_HOME=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents
CURL_HOME=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents
CURLOPT_SSH_KNOWNHOSTS=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.ssh/known_hosts
SSL_CERT_FILE=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/cacert.pem
PYTHONHOME=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/Library
XDG_CACHE_HOME=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library/Caches
XDG_CONFIG_HOME=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library/Preferences
XDG_STATE_HOME=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library
XDG_DATA_HOME=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library
PYTHONEXECUTABLE=python3
PYZMQ_BACKEND=cffi
JUPYTER_CONFIG_DIR=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.jupyter
IPYTHONDIR=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.ipython
MPLCONFIGDIR=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.config/matplotlib
HGRCPATH=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.hgrc
APPNAME=a-Shell
APPVERSION=1.15.6
APPBUILDNUMBER=431
VIMRUNTIME=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/vim
TERM_PROGRAM=a-Shell
COLORTERM=truecolor
MAGIC=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/usr/share/magic.mgc
SHORTCUTS=/private/var/mobile/Containers/Shared/AppGroup/96CFF3B1-EAED-4ECF-B5E0-F2B1307352ED
GROUP=/private/var/mobile/Containers/Shared/AppGroup/96CFF3B1-EAED-4ECF-B5E0-F2B1307352ED
MANPATH=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/man:/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library/man:/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/perl5/man
PAGER=less
MAGICK_HOME=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/ImageMagick-7
MAGICK_CONFIGURE_PATH=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/ImageMagick-7/config
PS1=[\w]\$ 
TERMINFO=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/terminfo/
TZ=Asia/Shanghai
AWS_SHARED_CREDENTIALS_FILE=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.aws/credentials
AWS_CONFIG_FILE=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.aws/config
PIP_CONFIG_FILE=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.config/pip/pip.conf
PIP_NO_BUILD_ISOLATION=false
SPACEVIMDIR=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.SpaceVim.d/
YARL_NO_EXTENSIONS=1
MULTIDICT_NO_EXTENSIONS=1
DISABLE_SQLALCHEMY_CEXT=1
SYSROOT=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library/usr
CCC_OVERRIDE_OPTIONS=#^--target=wasm32-wasip1 ^-fwasm-exceptions +-lunwind
MAKESYSPATH=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/usr/share/mk
PERL5LIB=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/perl5/lib/perl5:/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/Perl
PERL_LOCAL_LIB_ROOT=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/perl5
PERL_CPANM_HOME=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/.cpanm
PERL_MM_OPT='INSTALL_BASE=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/perl5'
PERL_MB_OPT=--install_base "/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/perl5"
SUNPY_NO_BUILD_ANA_EXTENSION=1
NLTK_DATA=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/nltk_data
SUNPY_DOWNLOADDIR=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Documents/sunpy
PYPROJ_GLOBAL_CONTEXT=ON
PROJ_LIB=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/proj
PROJ_DATA=/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/proj
PROJ_NETWORK=ON
PYTHONPYCACHEPREFIX=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library/__pycache__
PYTHONUSERBASE=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library
BLINK_OVERLAYS=/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/Library/blinkroot:
COLORFGBG=0;15
LINES=19
COLUMNS=128
LC_CTYPE=UTF-8

By the way,I want to view https://raw.githubusercontent.com/holzschu/a-Shell-commands/master / otherwise but it show 404:Not fount

holzschu commented 1 month ago

Hi, I don't have the issue on my local devices. I suspect a temporary or localized issue with GitHub.

By the way, there is no more security: you cannot access .../master directly, you have to access a specific file (at least on my browser): https://raw.githubusercontent.com/holzschu/a-Shell-commands/refs/heads/master/list

Mrlaolu commented 1 month ago

https://raw.githubusercontent.com/holzschu/a-Shell-commands/refs/heads/master/list is ok,I will try to use pkg later. By the way,how to use the command ping to check whether I can connect the .../master

holzschu commented 1 month ago

ping raw.githubusercontent.com should give some information.

Mrlaolu commented 1 month ago

I use vpn and connected the .../master but it show [~/tmp]$ pkg install llvm-18 Downloading llvm-18 /private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/bin/chmod: /private/var/mobile/Conta iners/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18: No such file or directory dash: 0: Can't open /private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18 /private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/bin/rm: /private/var/mobile/Containe rs/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18: No such file or directory Downloading llvm-18 /private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/bin/chmod: /private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18: No such file or directory dash: 0: Can't open /private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18 /private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/bin/rm: /private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18: No such file or directory Done I guess it blame to my poor Internet condition,but how can i solve it

Mrlaolu commented 1 month ago
[~/tmp]$ pkg install llvm-18
Downloading llvm-18
/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/bin/chmod: /private/var/mobile/Conta
iners/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18: No such file or directory
dash: 0: Can't open /private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18
/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/bin/rm: /private/var/mobile/Containe
rs/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18: No such file or directory
Downloading llvm-18
/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/bin/chmod: /private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18: No such file or directory
dash: 0: Can't open /private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18
/private/var/containers/Bundle/Application/988F0AA3-E1C6-4B21-85C3-35D207126F10/a-Shell.app/bin/rm: /private/var/mobile/Containers/Data/Application/E0216D3C-696D-4EE9-A4CB-EEC9879641E5/tmp/llvm-18: No such file or directory
Done
holzschu commented 1 month ago

I guess that, with what you describe, we'll have to run what pkg does, but manually. From the error message, it failed at downloading llvm-18, the script that contains the instructions. Which may be related to restrictions on your network part.

So you'll need to type:

curl -L https://github.com/holzschu/a-Shell-commands/releases/download/0.1/llvm-18.tar.gz -o ~/tmp/llvm.tar.gz --create-dirs --silent

That's the big one, it downloads a large file. You can also download it using Safari here: https://github.com/holzschu/a-Shell-commands/releases/tag/0.1 Then we unpack it:

cd  ~/Library/
tar -xzf ~/tmp/llvm.tar.gz 
cd -

Then we signal to a-Shell thar we just installed a new SDK:

updateCommands

The last step is optional: download the uninstall information:

curl -L https://raw.githubusercontent.com/holzschu/a-Shell-commands/master/uninstall/llvm-18 -o ~/Documents/.pkg/llvm-18 --create-dirs --silent