1

I am trying to extract an tarball, I keep getting this error

tar: mediatek/custom/common/lk/lcm/bp101wx1_n/bp101wx1_n.c: Cannot open: Not a directory
tar: mediatek/custom/common/lk/lcm/hsd070idw1/hsd070idw1.c: Cannot open: Not a directory
tar: mediatek/custom/common/lk/lcm/nt35582/nt35582.c: Cannot open: Not a directory
tar: mediatek/custom/common/lk/lcm/r63311_fhd_dsi_vdo_sharp/r63311_fhd_dsi_vdo_sharp.c: Cannot open: Not a directory
tar: mediatek/custom/common/lk/lcm/otm9608_wvga_dsi_cmd/otm9608_wvga_dsi_cmd.c: Cannot open: Not a directory
tar: mediatek/custom/common/lk/lcm/lg4571/lg4571.c: Cannot open: Not a directory
tar: mediatek/custom/common/lk/lcm/hx8363b_wvga_dsi_cmd/hx8363b_wvga_dsi_cmd.c: Cannot open: Not a directory
tar: mediatek/custom/common/lk/lcm/lg4573b_wvga_dsi_vdo_lh430mv1/lg4573b_wvga_dsi_vdo_lh430mv1.c: Cannot open: Not a directory
tar: Exiting with failure status due to previous errors

The original file was a .zip file that contained a .tar.gz file, so I first used unzip then I used pigz with the -d option to create the tar file.

I extracted the tar file using tar with xf option.

Extracting the tar.gz using the tar xzf also doesn't work :/

Using 7za I get

can not open output file mediatek/custom/common/lk/lcm/bm8578/bm8578.c
can not open output file mediatek/custom/common/lk/lcm/nt35565_qhd_dsi_cmd/nt35565_qhd_dsi_cmd.c
can not open output file mediatek/custom/common/lk/lcm/spfd5461a/spfd5461a.c
can not open output file mediatek/custom/common/lk/lcm/bp101wx1_n/bp101wx1_n.c
can not open output file mediatek/custom/common/lk/lcm/hsd070idw1/hsd070idw1.c
can not open output file mediatek/custom/common/lk/lcm/nt35582/nt35582.c
can not open output file mediatek/custom/common/lk/lcm/r63311_fhd_dsi_vdo_sharp/r63311_fhd_dsi_vdo_sharp.c
can not open output file mediatek/custom/common/lk/lcm/otm9608_wvga_dsi_cmd/otm9608_wvga_dsi_cmd.c
can not open output file mediatek/custom/common/lk/lcm/lg4571/lg4571.c
can not open output file mediatek/custom/common/lk/lcm/hx8363b_wvga_dsi_cmd/hx8363b_wvga_dsi_cmd.c
can not open output file mediatek/custom/common/lk/lcm/lg4573b_wvga_dsi_vdo_lh430mv1/lg4573b_wvga_dsi_vdo_lh430mv1.c

Sub items Errors: 3869

The tar file is 3.8 GB if that matters

3
  • 1
    The file might be corrupted, use a checksum or similar to verify.
    – kiri
    Oct 1 '13 at 9:54
  • I'm sure it's corrupted, check with gzip -t the file. It will tell, also you might to know the bytes count if they don't fit with the servers.
    – Braiam
    Oct 2 '13 at 0:17
  • The file is not corrupted, it extracts in Windows using WinRaR,(7zip doesn't extract it).
    – HackToHell
    Oct 2 '13 at 3:39
1

According to here you can do tar -xvzf location.tar.gz. Try that

4
  • 1
    Doesn't work, tried it
    – HackToHell
    Oct 1 '13 at 7:52
  • And it's a tar.gz not tar?
    – user171354
    Oct 1 '13 at 8:02
  • yes, tried with the tar.gz too
    – HackToHell
    Oct 1 '13 at 9:04
  • 1
    Just a note that the order of the options is importatnt. tar -xvfz will throw a cannot open: no such file or directory but tar -xvzf will work. Oct 16 '13 at 20:32
1

It might be that the name of the directory you are extracting is the same as the file you are extracting, try to rename the archive file before extracting.

It worked for me when I had a similar problem.

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.