termux-pacman / pacman-for-termux

Special configured pacman for termux.
https://termux-pacman.dev
MIT License
73 stars 6 forks source link

Can't create '/go/to/file' #5

Closed Maxython closed 3 years ago

Maxython commented 3 years ago

I decided to experiment with installing packages without dependency. As a result, it was installed by pacman, but it was not installed in /usr/bin.
Example gcc installation:

~ $ pacman -Sdd gcc
warning: gcc-10.2.0-1 is up to date -- reinstalling
looking for conflicting packages...

Packages (1) gcc-10.2.0-1

Total Installed Size:  124.23 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [####] 100%
(1/1) checking package integrity                   [####] 100%
(1/1) loading package files                        [####] 100%
(1/1) checking for file conflicts                  [####] 100%
(1/1) checking available disk space                [####] 100%
warning: could not get file information for usr/bin/aarch64-unknown-linux-gnu-g++
warning: could not get file information for usr/bin/aarch64-unknown-linux-gnu-gcc-10.2.0
warning: could not get file information for usr/bin/c++
warning: could not get file information for usr/bin/g++
warning: could not get file information for usr/bin/gcc
warning: could not get file information for usr/bin/gcc-ar
warning: could not get file information for usr/bin/gcc-nm
warning: could not get file information for usr/bin/gcc-ranlib
:: Processing package changes...
(1/1) reinstalling gcc                             [####] 100%
warning: warning given when extracting /usr/bin/aarch64-unknown-linux-gnu-g++ (Can't create '/usr/bin/aarch64-unknown-linux-gnu-g++')
warning: warning given when extracting /usr/bin/aarch64-unknown-linux-gnu-gcc-10.2.0 (Can't create '/usr/bin/aarch64-unknown-linux-gnu-gcc-10.2.0')
warning: warning given when extracting /usr/bin/c++ (Can't create '/usr/bin/c++')
warning: warning given when extracting /usr/bin/g++ (Can't create '/usr/bin/g++')
warning: warning given when extracting /usr/bin/gcc (Can't create '/usr/bin/gcc')
warning: warning given when extracting /usr/bin/gcc-ar (Can't create '/usr/bin/gcc-ar')
warning: warning given when extracting /usr/bin/gcc-nm (Can't create '/usr/bin/gcc-nm')
warning: warning given when extracting /usr/bin/gcc-ranlib (Can't create '/usr/bin/gcc-ranlib')
~ $ gcc
The program gcc is not installed. Install it by executing:
 pkg install clang
Maxython commented 3 years ago

This error is not thrown on all packages.

Maxython commented 3 years ago

Another example of a package with this error is tzdata.

Maxython commented 3 years ago

Cause of error: Cannot hard link to ‘file or directory’: Permission denied.

.../pacman/pkg $ tar xvJf gcc-10.2.0-1-aarch64.pkg.tar.xz | grep "Permission denied"
tar: usr/bin/aarch64-unknown-linux-gnu-g++: Cannot hard link to ‘usr/bin/aarch64-unknown-linux-gnu-c++’: Permission denied
tar: usr/bin/aarch64-unknown-linux-gnu-gcc-10.2.0: Cannot hard link to ‘usr/bin/aarch64-unknown-linux-gnu-gcc’: Permission denied
tar: usr/bin/c++: Cannot hard link to ‘usr/bin/aarch64-unknown-linux-gnu-c++’: Permission denied
tar: usr/bin/g++: Cannot hard link to ‘usr/bin/aarch64-unknown-linux-gnu-c++’: Permission denied
tar: usr/bin/gcc: Cannot hard link to ‘usr/bin/aarch64-unknown-linux-gnu-gcc’: Permission denied
tar: usr/bin/gcc-ar: Cannot hard link to ‘usr/bin/aarch64-unknown-linux-gnu-gcc-ar’: Permission denied
tar: usr/bin/gcc-nm: Cannot hard link to ‘usr/bin/aarch64-unknown-linux-gnu-gcc-nm’: Permission denied
tar: usr/bin/gcc-ranlib: Cannot hard link to ‘usr/bin/aarch64-unknown-linux-gnu-gcc-ranlib’: Permission denied
tar: Exiting with failure status due to previous errors
Maxython commented 3 years ago

The problem was solved.
add.c