0

I was trying to install insight debugger in ubuntu 15.10 64 bit. Here's what I did:

First I opened /etc/apt/sources.list in gedit

sudo gedit /etc/apt/sources.list

then I add these two line at the end of the file

deb http://ppa.launchpad.net/sevenmachines/dev/ubuntu natty main
deb-src http://ppa.launchpad.net/sevenmachines/dev/ubuntu natty main

then

sudo apt-get update

finally I tried to install insight

sudo apt-get install insight

but this gives me an error here's the original error message

(Reading database ... 238526 files and directories currently installed.)
Preparing to unpack .../insight_6.8.1-0ubuntu0~sevenmachines1_amd64.deb ...
Unpacking insight (6.8.1-0ubuntu0~sevenmachines1) ...
dpkg: error processing archive /var/cache/apt/archives/insight_6.8.1-0ubuntu0~sevenmachines1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/libinproctrace.so', which is also in package gdbserver 7.10-1ubuntu2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/insight_6.8.1-0ubuntu0~sevenmachines1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

What can I do for this error? Is there anyway I can install insight?

muru
  • 197,895
  • 55
  • 485
  • 740
0xEDD1E
  • 111
  • 1
    It seems that insight conflicts with gdbserver (they install the same file). Have you tried uninstalling the latter? – fkraiem Dec 16 '15 at 02:51
  • I tried but then It tried to replace a file owned by gdb I can't remove gdb. But I could successfully install insight on 14.04 32 bit – 0xEDD1E Dec 17 '15 at 04:14

1 Answers1

0

Thanks everybody for helping me on this problem. I think I found a solution for this error. Thanks "fkraiem" for giving the hint. This is my solution

First of all I backed up the files insight trying to overwrite (this should be done as root)

su 
mv /usr/lib/libinproctrace.so /home/(usrname)/Desktop/libinproctrace.so
mv /usr/bin/gdb-add-index /home/(username)/Desktop/gdb-add-index

Then I removed gdbserver which owns the file /usr/liblibinproctrace.so:

sudo apt-get remove gdbserver

But the insight tried to replace file /usr/bin/gdb-add-index belonging to gdb. So I removed gdb too:

sudo apt-get remove gdb

then I installed insight

sudo apt-get install insight

It successfully executed but I can't use insight because I removed gdb so I had to re-install gdb but I can't do it because now gdb is trying to replace those 2 files now belonging to insight. So I deleted them (it's OK because I backed up original files) (as root) and then I installed gdb:

rm /usr/bin/gdb-add-index /usr/lib/libinproctrace.so
sudo apt-get install gdb

It was successful. Check if gdb-add-index & libinproctrace.so exist in their default folders. If not, copy the backed up files.

Finally,

su
gedit /usr/bin/gdb-add-index

and add this snippet to file and save

gdb --batch-silent -ex "file $file" -ex "save gdb-index $dir"

if test -f "${file}.gdb-index"; then
   objcopy --add-section .gdb_index="${file}.gdb-index" --set-section-flags .gdb_index=readonly "$file" "$file"
    rm -f "${file}.gdb-index"
fi

*This snippet was the gdb-add-index installed by insight. I don't know what it do but I copied it into the gdb's gdb-add-index.

muru
  • 197,895
  • 55
  • 485
  • 740
0xEDD1E
  • 111