Score:2

How to install "gcc-arm-linux-gnueabihf" specific version?

kr flag

Am performing cross compilation on x86 and target platform is armhf. When i run command apt-get install -y gcc-arm-linux* g++-arm-linux*, It installs 4.11.2.0 version and output is as below

g++-arm-linux-gnueabi is already the newest version (4:11.2.0-1ubuntu1). 
g++-arm-linux-gnueabihf is already the newest version (4:11.2.0-1ubuntu1).    
gcc-arm-linux-gnueabi is already the newest version (4:11.2.0-1ubuntu1).    
gcc-arm-linux-gnueabihf is already the newest version (4:11.2.0-1ubuntu1)

But i need 4.9.3.0 version. How to install 4.9.3.0 version in ubuntu command line??

Am using ubuntu 20.04 and performing cross compilation using focal apt list

my /etc/apt.source.list file is as below

echo "### Copying ARM sources to /etc/apt/sources.list ###"
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" >  /etc/apt/sources.list
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal main universe" >>  /etc/apt/sources.list
echo "deb-src http://archive.ubuntu.com/ubuntu focal main universe" >>  /etc/apt/sources.list

Output of apt policy gcc-arm-linux-gnueabihf

gcc-arm-linux-gnueabihf:
  Installed: 4:11.2.0-1ubuntu1
  Candidate: 4:11.2.0-1ubuntu1
  Version table:
 *** 4:11.2.0-1ubuntu1 100
        100 /var/lib/dpkg/status
     4:9.3.0-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
hr flag
Please include the output of `apt policy gcc-arm-linux-gnueabihf` in your question
Karma Yogi avatar
kr flag
Added output in the question
hr flag
So I don't see any repository associated with the 11.2.0-1ubuntu1 version - did you install it manually from a .deb file?
Score:1
ng flag

You can force a version:

apt-get install gcc-arm-linux-gnueabihf=4:9.3.0-1ubuntu2

From man apt-get: install pkg [{=pkg_version_number | /target_release}]...

Karma Yogi avatar
kr flag
Thanks for the solution, But before installing this i need to install "cpp-arm-linux-gnueabihf=4:9.3.0-1ubuntu2", since this is dependency for `gcc-arm-linux-gnueabihf=4.9.3.0`.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.