“ can not find ./obj/local/armeabi/libopencv_contrib.a: Permission denied ”問題 .

來源:互聯網
上載者:User

I am new to Android NDK and I have to use OpenCV in Android.

I tried to ran the NDK ahead , but these errors happened. Maybe I have no permission to use the file" /obj/local/armeabi/libopencv_contrib.a",How can I get the permission? And can the next error be OK when the first error is solved? My workspace OS is Windows7.

翻譯:我是一個使用Android NDK的新手,而且我必須在android上面使用OpenCV開發包。

我試圖跑NDK,但下面這些錯誤發生。也許我沒有許可權來使用檔案“/ obj / local / armeabi / libopencv_contrib.a。 “,我怎樣才能得到許可呢?並且可以接下來的錯誤可以當第一個錯誤是解決嗎?我的工作空間是作業系統Windows7。

錯誤:$ NDK-build

SharedLibrary : libImgFun.so D:/Android/android-ndk-r7b-windows/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libopencv_contrib.a:
No such file: Permission denied

collect2: ld returned 1 exit status /cygdrive/d/Android/android-ndk-r7b-windows/android-ndk-r7b/build/core/build-binary.mk:314: recipe for target `obj/local/armeabi/libImgFun.so' failed make: *[obj/local/armeabi/libImgFun.so]
Error 1


答案:

up
vote

I had the same problem on Windows 7. I was able to just use chmod to set the permissions manually, and then it worked. My best guess is that this is a bug with how Cygwin, Windows, and the build process interact.

翻譯:

我有相同的問題在Windows 7。我可以只使用chmod來手動設定許可權,然後它的工作。我最好的猜測是,這是一個bug與Cygwin,Windows,構建過程互動。

  • Open a console window
  • >
    bash
  • >
    cd /cygdrive/<driveletter>/<wherever your project is>/obj/local/armeabi
  • >
    chmod 777 ./*

  • 翻譯:開啟Cygwin
  • 輸入:cd /cygdrive/放工程檔案的盤符/工程檔案目錄/obj/local/armeabi
  • 輸入:chmod 777 ./*
  • (註:上面的錯誤的結果是沒有產生libs檔案,但產生了obj檔案,因此改這個錯誤的時候obj不要刪)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.