I have a server which uses the armhf (armv7l, Cortex A9 ARMv7 to be precise) CPU architecture.
I've been trying to install a certain package on it, but that doesn't work.
First off, APT mentioned it simply doesn't support the architecture:
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://repo.r1soft.com/apt stable InRelease' doesn't support architecture 'armhf'
What I did next, just for the sake of it, is change the architecture used for the repository. I found the repository supports amd64
.
I altered the /etc/apt/sources.list
to read:
deb [arch=amd64] http://repo.r1soft.com/apt stable main
This resulted in the APT error disappearing:
root@host:~# apt-get update
Get:1 http://last.public.ovh.hdaas.snap.mirrors.ovh.net/ubuntu xenial InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
Ign:3 http://repo.r1soft.com/apt stable InRelease
Hit:4 http://repo.r1soft.com/apt stable Release
Get:6 http://repo.r1soft.com/apt stable/main amd64 Packages [3633 B]
Fetched 6325 B in 1s (3953 B/s)
Reading package lists... Done
W: http://repo.r1soft.com/apt/dists/stable/Release.gpg: Signature by key 8954063F882837AE08F8D2CB1BF3530AA40384ED uses weak digest algorithm (SHA1)
However, upon actually installing the package, APT gets an error:
root@host:~# apt-get install serverbackup-enterprise
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package serverbackup-enterprise
Naturally, that doesn't work, as we're still installing the package from the repository without specifying the architecture. Upon doing this:
root@host:~# apt-get install serverbackup-enterprise:amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
r1soft-docstore:amd64 r1soft-getmodule:amd64 serverbackup-manager:amd64
serverbackup-setup:amd64
The following NEW packages will be installed:
r1soft-docstore:amd64 r1soft-getmodule:amd64 serverbackup-enterprise:amd64
serverbackup-manager:amd64 serverbackup-setup:amd64
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 348 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://repo.r1soft.com/apt stable/main amd64 r1soft-docstore amd64 6.2.2-78 [2110 kB]
Get:2 http://repo.r1soft.com/apt stable/main amd64 r1soft-getmodule amd64 1.0.0-51 [1860 kB]
Get:3 http://repo.r1soft.com/apt stable/main amd64 serverbackup-setup amd64 6.2.2-78 [2740 kB]
Get:4 http://repo.r1soft.com/apt stable/main amd64 serverbackup-manager amd64 6.2.2-78 [341 MB]
Get:5 http://repo.r1soft.com/apt stable/main amd64 serverbackup-enterprise amd64 6.2.2-78 [71.7 kB]
Fetched 348 MB in 2min 46s (2092 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: error processing archive /var/cache/apt/archives/r1soft-docstore_6.2.2-78_amd64.deb (--unpack):
package architecture (amd64) does not match system (armhf)
dpkg: error processing archive /var/cache/apt/archives/r1soft-getmodule_1.0.0-51_amd64.deb (--unpack):
package architecture (amd64) does not match system (armhf)
dpkg: error processing archive /var/cache/apt/archives/serverbackup-setup_6.2.2-78_amd64.deb (--unpack):
package architecture (amd64) does not match system (armhf)
dpkg: error processing archive /var/cache/apt/archives/serverbackup-manager_6.2.2-78_amd64.deb (--unpack):
package architecture (amd64) does not match system (armhf)
dpkg: error processing archive /var/cache/apt/archives/serverbackup-enterprise_6.2.2-78_amd64.deb (--unpack):
package architecture (amd64) does not match system (armhf)
Errors were encountered while processing:
/var/cache/apt/archives/r1soft-docstore_6.2.2-78_amd64.deb
/var/cache/apt/archives/r1soft-getmodule_1.0.0-51_amd64.deb
/var/cache/apt/archives/serverbackup-setup_6.2.2-78_amd64.deb
/var/cache/apt/archives/serverbackup-manager_6.2.2-78_amd64.deb
/var/cache/apt/archives/serverbackup-enterprise_6.2.2-78_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
So what I was thinking... The application itself supports the architecture - nothing can go wrong there.
Is there a way to 'fake' the CPU architecture?
I tried doing this hoping APT gathers the information from the output of the uname
command, but I doubt this. I still tried anyway:
alias UNAME="echo Linux host 4.9.2-armada375 #1 SMP Mon Jan 23 16:52:54 CET 2017 amd64 amd64 amd64 GNU/Linux"
Instead of:
alias UNAME="echo Linux host 4.9.2-armada375 #1 SMP Mon Jan 23 16:52:54 CET 2017 armv7l armv7l armv7l GNU/Linux"