-4

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"
17
  • What sort of 'server' uses a Cortex CPU??
    – Chopper3
    Apr 28, 2017 at 11:21
  • @Chopper3 I don't think that's relevant.
    – William
    Apr 28, 2017 at 11:25
  • 1
    Clearly it was relevant
    – Chopper3
    Apr 28, 2017 at 11:35
  • 1
    @WilliamD.Edwards You'll need to recompile it for ARM. The software may work, but the compiled versions for x64 or i386 will not on an ARM platform. You'll need to get the source to compile with the correct ARM flags, or have r1soft provide the binaries. You can't fake an architecture, the pieces just don't fit together unfortunately.
    – Jacob
    Apr 28, 2017 at 12:07
  • 2
    This is kind of like: "I'd like to drive my boat on the road but it's not compatible. How do I paint wheels on the boat so I can use it on public roads?"
    – MikeyB
    Apr 28, 2017 at 15:00

1 Answer 1

3

You would need to emulate an AMD64 / x86 processor in your ARM setup in order to execute binaries designed for AMD64 / x86.

While emulation is technically possible, it will be slow. One needs to execute each instruction in the binary file using software, which translates each instruction to ARM architecture. This will mean that several instructions are needed for the ARM side to execute a single AMD64 / x86 instruction.

One might also need to emulate memory subsystem etc.

I am not aware if such emulation has been done, and even if it has been done, I doubt it is usable in any real use case.

The only options you have is either to get AMD64 / x64 hardware for this software, or ask if the software provider can provide an ARM version of it.

Not the answer you're looking for? Browse other questions tagged .