gcc-arm-linux-gnueabi command not found - linux
I am trying to install the gnu arm toolchain for ubuntu. I first downloaded the tar from CodeSourcery. However when I go into the bin folder, I cannot run any of the binaries. I have tried with ./ and without and putting it in the PATH and it keeps telling me "Command not Found" yet the file is there in the folder right in front of me. Then I tried sudo apt-get install gcc-arm-linux-gnueabi except after it says it has installed successfully, I cannot find it with whereis gcc-arm-linux-gnueabi. Can anyone help?
fixed, using:
sudo apt-get install gcc-arm*
Are you compiling on a 64-bit OS? Try:
sudo apt-get install ia32-libs
I had the same problem when trying to compile the Raspberry Pi kernel. I was cross-compiling on Ubuntu 12.04 64-bit and the toolchain requires ia32-libs to work on on a 64-bit system.
See http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/
CodeSourcery convention is to use prefix arm-none-linux-gnueabi- for all executables, not gcc-arm-linux-gnueabi that you mention. So, standard name for CodeSourcery gcc would be arm-none-linux-gnueabi-gcc.
After you have installed CodeSourcery G++, you need to add CodeSourcery directory into your PATH.
Typically, I prefer to install CodeSourcery into directory like /opt/arm-2010q1 or something like that. If you don't know where you have installed it, you can find it using locate arm-none-linux-gnueabi-gcc, however you may need to force to update your locate db using sudo updatedb before locate will work properly.
After you have identified where your CodeSourcery is installed, add it your PATH by editing ~/.bashrc like this:
PATH=/opt/arm-2010q1/bin:$PATH
Also, it is customary and very convenient to define
CROSS_COMPILE=arm-none-linux-gnueabi-
in your .bashrc, because with CROSS_COMPILE defined, most tools will automatically use proper compiler for ARM compilation without you doing anything.
if you are on 64 bit os then you need to install this additional libraries.
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
got the same error when trying to cross compile the raspberry pi kernel on ubunto 14.04.03 64bit under VM. the solution was found here:
-Install packages used for cross compiling on the Ubuntu box.
sudo apt-get install gcc-arm-linux-gnueabi make git-core ncurses-dev
-Download the toolchain
cd ~
git clone https://github.com/raspberrypi/tools
-Add the toolchain to your path
PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin
notice the x64 version in the path command
I was also facing the same issue and resolved it after installing the following dependency:
sudo apt-get install lib32z1-dev
If you are on a 64bit build of ubuntu or debian (see e.g. 'cat /proc/version') you should simply use the 64bit cross compilers, if you cloned
git clone https://github.com/raspberrypi/tools
then the 64bit tools are in
tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64
use that directory for the gcc-toolchain.
A useful tutorial for compiling that I followed is available here Building and compiling Raspberry PI Kernel (use the -x64 path from above as ${CCPREFIX})
You have installed a toolchain which was compiled for i686 on a box which is running an x86_64 userland.
Use an i686 VM.
Its a bit counter-intuitive. The toolchain is called gcc-arm-linux-gnueabi. To invoke the tools execute the following: arm-linux-gnueabi-xxx
where xxx is gcc or ar or ld, etc
try the following command:
which gcc-arm-linux-gnueabi
Its very likely the command is installed in /usr/bin.
I had to cross compile C code in Ubuntu for ARM. This worked for me:
$ sudo apt install gcc-arm-none-eabi
Later, tested it on the qemu emulator
#Install qemu
sudo apt-get install qemu qemu-user-static qemu-system-arm
#Cross compile "helloworld.c"
$ arm-none-eabi-gcc --specs=rdimon.specs -Wl,--start-group -lgcc -lc -lm -lrdimon -Wl,--end-group helloworld.c -o helloworld
#Run
qemu-arm-static helloworld
Related
GCC not added to system path on pacman install
Issue When installing mingw on a fresh MSYS2 instance I run into the issue of gcc not found: $ g++ bash: g++: command not found Setup Fresh MSYS2 install on relatively clean windows 10 install: pacman -Syu pacman -Su pacman -S make pacman -S mingw-w64-x86_64-gcc Diagnostics It appears that GCC is successfully installed into the directory /mingw64/bin Yet my path consists of /usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl: As such gcc is not found. I have tried adding /mingw64/bin to the $PATH however this seems like a temporary fix of an underlying problem. My question specifically is, is there any reason as to why either the mingw is not installed into the /usr/bin/ directory or the installation did not add itself to the path, and or any simple reason as to what is causing this. Thanks in advance!
Since you installed mingw-w64-x86_64-gcc it seems like you want to compile 64-bit native Windows applications. Therefore, you should start MSYS2 by running mingw64.exe, found at the top level of your MSYS2 installation. That will put /mingw64/bin/ on your PATH and set some other useful environment variables.
Solution I have found simply adding C:\msys64\mingw64\bin to the host windows computers PATH variable this, in turn, adds \mingw64\bin to the MSYS2 $PATH solving the problem.
objdump is missing from windows10 pro (msys2 installed)
I have installed msys2 using chocolatey. I have tried msys2-installer module from chocolatey too. But I can not find objdump on my system. Should I install something more ?
MSYS2 supports three different compiler toolchains, all with their own objdump utility. I'm not sure which one you want to use, but you can just install them all by running: sudo pacman -S binutils mingw-w64-x86_64-binutils mingw-w64-i686-binutils
Installing the haskell-platform on the Nvidia Jetson TK1 (ARM Architecture)
Running lsb_release -s -d on the Jetson TK1 gives me Ubuntu 14.04 LTS So I tried sudo apt-get install haskell-platform and sudo apt-get install ghc and with both I get an error that it is unable to locate the package. So I enabled the universe repository as I saw on a stackoverflow post for installing the haskell-platform for ubuntu 14.04. I still get the same result. I see some people mentioning the got the haskell-platform to install on raspberry pis easily and that GHC now has good support for ARM but I don't see a way to get the install running on the Jetson TK1. My next option is to build from source, I don't see source for ARM architecture on the GHC or Haskell platform website. I know there is also cross compiling, I will start messing with that when I see there is no easier way.
I managed to compile GHC7.8.3 on the Jetson K1 and Adapteva Parallella. I wrote a blog post about it here which is more verbose, but here's a summarized rundown of what I did: You will need GHC7.6.3 or earlier to bootstrap the compilation. I ran sudo apt-get install ghc automake build-essential cabal-install groff You’ll also need Alex and Happy, sudo apt-get install alex happy. I also installed them in Cabal, cabal update && cabal install alex happy I decided to compile with llvm, clang and gold linker, because gcc wouldn’t compile all the way. sudo apt-get install llvm clang binutils Edit mk/build.mk. I uncommented the line about quick-llvm compilation BuildFlavour = quick-llvm. You'll also need to replace appearances of -H64m with -H32m perl boot and sudo ./configure --with-clang=/usr/bin/clang --with-ar=/usr/bin/ar Because there is a linker issue, obtain the following script that will switch between standard ld and gold: https://gist.githubusercontent.com/bgamari/9399430/raw/build-ghc-arm.sh chmod ugo+rx build-ghc-arm.sh sudo /build-ghc-arm.sh -j6 sudo make install
"configure: error: libnl and libnl-genl are required but were not found"
I'm trying to configure powertop-2.5 but when I run ./configure I get a "configure: error: libnl and libnl-genl are required but were not found" error I've run sudo apt-get install libtool autoconf libnl-dev ncurses-dev pciutils-dev build-essential -y as was recommended by these guys but I get the same error. I ran sudo apt-get install libnl-genl-3-dev Which replaced the previous libnl file but I still get the config error. According to this, powertop has (or had) problems with detecting libnl but I can't figure out how to fix it. I'm currently running Linux username 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 i686 GNU/Linux
I see you tried libnl-dev, maybe try libnl-3-dev instead: sudo apt-get install libnl-3-dev libnl-genl-3-dev
Probably the problem is the lack of the pkg-config application in your system (which is used to find the proper dependencies with the configure script). I just have the same problem in a fresh installed Ubuntu 14.04 system, and after installing the pkg-config package the configure script finalized successfully its work. Then I could compile and install the last version (2.6.1) of powertop.
I "solved" my problem by installing powertop-2.0 instead.
The use of pkg-config made the trick. I was able to install Powertop 2.7.
error while loading shared libraries: libncurses.so.5:
I've installed Android Studio and tried to run my first project in it, and I've got following error: Error Output was: /home/user/android-studio/sdk/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory I've already tried to run sudo ldconfig but it doesnt help. I've recently installed libncurses (before using android studio). What should I do?
If libncurses is not installed then install it and try again. for 32-bit binaries : sudo apt-get install libncurses5:i386 for 64-bit binaries : sudo apt-get install libncurses5 Also install the collection of libraries by using this command, sudo apt-get install ia32-libs
error while loading shared libraries: libncurses.so.5 If you see this, your distro probably has a newer version of libncurse installed. First find out what version of libncurses your distro has: $ ls -1 /usr/lib/libncurses* /usr/lib/libncurses.so /usr/lib/libncurses++.so /usr/lib/libncurses++w.so /usr/lib/libncursesw.so /usr/lib/libncurses++w.so.6 /usr/lib/libncursesw.so.6 /usr/lib/libncurses++w.so.6.0 /usr/lib/libncursesw.so.6.0 In this case, we are dealing with version 6, so we make two symlinks: $ sudo ln -s /usr/lib/libncursesw.so.6.0 /usr/lib/libncurses.so.5 $ sudo ln -s /usr/lib/libncursesw.so.6.0 /usr/lib/libtinfo.so.5 After this, the program should run normally.
If you are absolutely sure that libncurses, aka ncurses, is installed, as in you've done a successful 'ls' of the library, then perhaps you are running a 64 bit Linux operating system and only have the 64 bit libncurses installed, when the program that is running (adb) is 32 bit. If so, a 32 bit program can't link to a 64 bit library (and won't locate it anyway), so you might have to install libcurses, or ncurses (32 bit version). Likewise, if you are running a 64 bit adb, perhaps your ncurses is 32 bit (a possible but less likely scenario).
For Redhat Linux 8 try this: sudo yum install libncurses*
On Arch Linux you can install ncurses5-compat-libs AUR package. FYI it is mentioned in Arch Wiki android page, just in case if you'll need some other dependencies for Android Studio: https://wiki.archlinux.org/index.php/Android
For Redhat Linux this helped, sudo yum install ncurses-compat-libs
In Fedora 28 use: sudo dnf install ncurses-compat-libs
I solved the issue using ln -s libncursesw.so.5 /lib/x86_64-linux-gnu/libncursesw.so.6 on ubunutu 18.10
On Arch, i fix like this: sudo ln -s /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.6
To install ncurses-compat-libs on Fedora 24 helped me on this issue (unable to start adb error while loading shared libraries: libncurses.so.5)
Your system likely does not provide the ncurses library at the version android studio uses. My arch linux install only had ncurses 6 but android studio needs version 5. You could check if your distribution has a compatability package, or use the solution that Rahmat Aligos suggested.
Mixaz's above answer worked for me. However I had issues installing the package because of PGP check failures. Installing it by skipping the signature worked, you could try this : yaourt --m-arg "--skipchecksums --skippgpcheck" -Sb <your-package>