解決mips-openwrt-linux-uclibc-g++.bin: environment variable "STAGING_DIR" not defined__linux

來源:互聯網
上載者:User

在Openwrt編譯工具鏈和SDK之後可能報錯如下:

zchx@zchx-System-Product-Name:~$ mips-openwrt-linux-g++ mips-openwrt-linux-uclibc-g++.bin: environment variable "STAGING_DIR" not defined


其解決方案很簡單,就是編譯的時候也選擇上編譯SDk,在編譯好了的SDK中,包含了工具鏈。這裡的工具鏈就不會報錯了。Good TIme。
zchx@zchx-System-Product-Name:~/Openwrt-USE/OpenWrt-SDK-atheros-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.30.1/bin$ ls
ldd                           mips-openwrt-linux-uclibc-addr2line
mips-openwrt-linux-addr2line  mips-openwrt-linux-uclibc-ar
mips-openwrt-linux-ar         mips-openwrt-linux-uclibc-as
mips-openwrt-linux-as         mips-openwrt-linux-uclibc-c++
mips-openwrt-linux-c++        mips-openwrt-linux-uclibc-c++filt
mips-openwrt-linux-c++filt    mips-openwrt-linux-uclibc-cpp
mips-openwrt-linux-cpp        mips-openwrt-linux-uclibc-g++
mips-openwrt-linux-g++        mips-openwrt-linux-uclibc-gcc
mips-openwrt-linux-gcc        mips-openwrt-linux-uclibc-gcc-4.3.3
mips-openwrt-linux-gcc-4.3.3  mips-openwrt-linux-uclibc-gccbug
mips-openwrt-linux-gccbug     mips-openwrt-linux-uclibc-gcov
mips-openwrt-linux-gcov       mips-openwrt-linux-uclibc-gprof
mips-openwrt-linux-gprof      mips-openwrt-linux-uclibc-ld
mips-openwrt-linux-ld         mips-openwrt-linux-uclibc-nm
mips-openwrt-linux-nm         mips-openwrt-linux-uclibc-objcopy
mips-openwrt-linux-objcopy    mips-openwrt-linux-uclibc-objdump
mips-openwrt-linux-objdump    mips-openwrt-linux-uclibc-ranlib
mips-openwrt-linux-ranlib     mips-openwrt-linux-uclibc-readelf
mips-openwrt-linux-readelf    mips-openwrt-linux-uclibc-size
mips-openwrt-linux-size       mips-openwrt-linux-uclibc-strings
mips-openwrt-linux-strings    mips-openwrt-linux-uclibc-strip
mips-openwrt-linux-strip
zchx@zchx-System-Product-Name:~/Openwrt-USE/OpenWrt-SDK-atheros-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.30.1/bin$ ./mips-openwrt-linux-g++

然後把staging_dir加入到環境變數中就可以了。

export STAGING_DIR=~/Downloads/OpenWrt-SDK-atheros-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.30.1/bin:$STAGING_DIR

使用eclipse的話,不要使用sudo登陸。直接普通使用者登陸

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.