1

After typing sudo apt-get install droidcam

i am getting error :-

Setting up droidcam (1.3-0ubuntu0) ...
tar: *.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
dpkg: error processing package droidcam (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 droidcam
E: Sub-process /usr/bin/dpkg returned an error code (1)

output for sudo apt-cache policy droidcam

droidcam:
  Installed: 1.3-0ubuntu0
  Candidate: 1.3-0ubuntu0
  Version table:
 *** 1.3-0ubuntu0 0
        500 http://ppa.launchpad.net/paolorotolo/droidcam/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

how to solve this issue ?

  • Edit your question and add the output of apt-cache policy droidcam – A.B. Oct 12 '15 at 5:17
  • updated please look @A.B. – Ashu_FalcoN Oct 12 '15 at 5:25
  • It looks almost as if you have droidcam installed already – David Oct 12 '15 at 5:40
  • Only a hint, remove droidcam and that will also cause problems. Give me a ping if you're stuck. – A.B. Oct 12 '15 at 7:11
  • any reasons of down voting this question ? – Ashu_FalcoN Oct 18 '15 at 2:43
2

Actually, the error you mentioned is 2nd state after 1st install trial.

  • The first trial ends up with make/compilation error and removes the module source archives (without checking if build was successful).
  • The next trials show missing kernel module source archive.

Here is the original error (full log):

make -C /lib/modules/`uname -r`/build M=`pwd`                                                                                                                                          
make[1]: Entering directory '/usr/src/linux-headers-3.19.0-30-generic'                                                                                                                 
  LD      /opt/droidcam/v4l2loopback/built-in.o                                                                                                                                        
  CC [M]  /opt/droidcam/v4l2loopback/v4l2loopback-dc.o                                                                                                                                 
/opt/droidcam/v4l2loopback/v4l2loopback-dc.c: In function ‘attr_store_maxopeners’:                                                                                                     
/opt/droidcam/v4l2loopback/v4l2loopback-dc.c:456:3: error: implicit declaration of function ‘strict_strtoul’ [-Werror=implicit-function-declaration]
   if (strict_strtoul(buf, 0, &curr))
   ^
/opt/droidcam/v4l2loopback/v4l2loopback-dc.c: At top level:
/opt/droidcam/v4l2loopback/v4l2loopback-dc.c:2311:3: warning: initialization from incompatible pointer type
   .vidioc_s_std            = &vidioc_s_std,
   ^
/opt/droidcam/v4l2loopback/v4l2loopback-dc.c:2311:3: warning: (near initialization for ‘v4l2_loopback_ioctl_ops.vidioc_s_std’)
/opt/droidcam/v4l2loopback/v4l2loopback-dc.c:2331:3: warning: initialization from incompatible pointer type
   .vidioc_s_audio          = &vidioc_s_audio,
   ^
/opt/droidcam/v4l2loopback/v4l2loopback-dc.c:2331:3: warning: (near initialization for ‘v4l2_loopback_ioctl_ops.vidioc_s_audio’)
/opt/droidcam/v4l2loopback/v4l2loopback-dc.c:2333:3: warning: initialization from incompatible pointer type
   .vidioc_s_audout         = &vidioc_s_audout,
   ^
/opt/droidcam/v4l2loopback/v4l2loopback-dc.c:2333:3: warning: (near initialization for ‘v4l2_loopback_ioctl_ops.vidioc_s_audout’)
cc1: some warnings being treated as errors
scripts/Makefile.build:263: recipe for target '/opt/droidcam/v4l2loopback/v4l2loopback-dc.o' failed
make[2]: *** [/opt/droidcam/v4l2loopback/v4l2loopback-dc.o] Error 1
Makefile:1395: recipe for target '_module_/opt/droidcam/v4l2loopback' failed
make[1]: *** [_module_/opt/droidcam/v4l2loopback] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.19.0-30-generic'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2

To fix the original error, strict_strtoul was replaced with kstrtoul

  1. Get source

    sudo apt-add-repository -s ppa:paolorotolo/droidcam
    sudo apt-get update
    
    mkdir sand_box
    cd sand_box
    
    apt-get source droidcam
    cd droidcam-*/
    
  2. Install build dependencies

    sudo apt-get builddep droiddeb
    sudo apt-get install devscripts debhelper
    
  3. Replace strict_strtoul with kstrtoul in:

    • droidcam-v4l2-x64.tar.gz : /v4l2loopback/v4l2loopback-dc.c
    • droidcam-v4l2-x86.tar.gz : /v4l2loopback/v4l2loopback-dc.c
  4. Build & install

    debbuild -d -uc
    sudo dpkg -i ../droidcam_*.deb
    

Another way, without debian package rebuild:

  1. After you have tried installing it and got the error. If not yet, run:

    sudo apt-get install droidcam
    
  2. Go to /var/cache/apt/archives/. Open its package with archive-manager and extract both droidcam-v4l2-*.tar.gz files (or just needed arch)

  3. Replace strict_strtoul with kstrtoul in:

    • droidcam-v4l2-x64.tar.gz : /v4l2loopback/v4l2loopback-dc.c
    • droidcam-v4l2-x86.tar.gz : /v4l2loopback/v4l2loopback-dc.c
  4. Move both archives to /opt/droidcam/

    sudo mv droidcam-v4l2-*.tar.gz /opt/droidcam/
    
  5. Run installation again to rebuild it

    sudo apt-get install droidcam
    

References:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.