When i try apt-get update on backtrack 5r3 it doesnt work - apt

it says failed to fetch http://some urls..
and E:Some index files failed to download,they have been ignored,or old ones used instead. what i am doing with that code "apt-get update"?

first you need to remove the Repository(URLS) that is not able to fetch from /etc/apt/sources.list
Then you run:
1:
aptitude clean (cleans all .deb "package stock" in /var/cache/apt/archives)
(cleans all .deb "package stock" in /var/cache/apt/archives)
2
aptitude update
3
aptitude full-upgrade
Good luck!
Best regards
Daniel

Related

go building error: lzma.h No such file or directory

I'm building payload-dumper-go, and I get this error,
❯ go build
# github.com/spencercw/go-xz
/home/ecarroll/go/pkg/mod/github.com/spencercw/go-xz#v0.0.0-20181128201811-c82a2123b492/compression.go:36:10: fatal error: lzma.h: No such file or directory
36 | #include <lzma.h>
| ^~~~~~~~
compilation terminated.
Here's an easier way for "next time".
github.com/ssut/payload-dumper-go uses Github Actions for building and testing.
Checking its .github/workflows/build.yml file:
...
steps:
- name: Install dependencies
run: |
sudo apt -y update
sudo apt -y install git golang liblzma-dev
...
The last quoted line contains the needed dependencies, namely git, golang and liblzma-dev.
I solve this by brute force trying all lzma stuff that Debian had. The actually packaged needed was,
sudo apt install liblzma-dev
packages that didn't work,
lzma-dev
golang-github-kjk-lzma-dev

Problem in install gtest, can not compile it due to huge errors

Tons of compile errors occur when make.
What I did are itemized:
My operation is shown itemized:
yum install git
yum install gcc-c++
yum install cmake
yum install python
yum install zeromq-devel
Then :
git clone https://github.com/google/googletest.git
cd /googletest/googletest
[root#VM_16_11_centos googletest]# cmake CMakeLists.txt
-- Configuring done
-- Generating done
-- Build files have been written to:
/usr/local/qiuxin/googletest/googletest
`[root#VM_16_11_centos googletest]# make
Huge Error here!!!
In file included from
/usr/local/qiuxin/googletest/googletest/src/gtest-all.cc:38:0:
/usr/local/qiuxin/googletest/googletest/include/gtest/gtest.h: In
member function 'virtual
testing::Test::Setup_should_be_spelled_SetUp*
testing::Test::Setup()':
solved. The mistake I made was:
1) I created a build folder in the googletest/googletest directory.
The right operation should be:
Create a build folder in googletest directory(NOT googletest/googletest directory.).
then:
cd build
cmake .. -DBUILD_GTEST=ON -DBUILD_SHARED_LIBS=ON
make
sudo make install
Everything goes well!

Bash on Ubuntu on Windows can't use `sudo apt-get install <packagename>`

I was excited to use bash on windows but quickly ran into an issue. I am trying to install build-essential, but I get a dependency issue. Upon trying to resolve with sudo apt-get install -f, I run into another error that doesn't make much sense. I've tried update and upgrade, but that didn't work either. F
barzevp#UK-LT-8356:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
libc6-dev : Depends: linux-libc-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
barzevp#UK-LT-8356:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-libc-dev
The following NEW packages will be installed
linux-libc-dev
0 to upgrade, 1 to newly install, 0 to remove and 43 not to upgrade.
5 not fully installed or removed.
Need to get 0 B/767 kB of archives.
After this operation, 3,946 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 28660 files and directories currently installed.)
Preparing to unpack .../linux-libc-dev_3.13.0-123.172_amd64.deb ...
Unpacking linux-libc-dev:amd64 (3.13.0-123.172) ...
dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_3.13.0-123.172_amd64.deb (--unpack):
unable to install new version of /usr/include/linux/netfilter_ipv6/ip6t_hl.h': File exists
E: Sub-process /usr/bin/dpkg returned an error code (1)
Full log of what led to the error in Bash on Ubuntu on Windows terminal is here:
https://pastebin.com/dq2D2Gtz
I don't have a solution, but I see the root of the problem. It seems to have to do with case sensitivity on the filesystem. The package for linux-libc-dev puts two copies of a file in /usr/include/linux/netfilter_ipv6 with only a difference in case; ip6t_HL.h, and ip6t_hl.h. After placing ip6t_HL.h, it attempts to rename ip6t_hl.h.dpkg-new to ip6t_hl.h. The system call to rename the file fails, claiming that ip6t_hl.h already exists
On a "real" linux system, ip6t_HL.h and ip6t_hl.h would clearly be different files. Under WSL they probably had some strange incompatibilities to work out between NTFS's default case insensitive FS and unix's default case sensitivity.
You can duplicate the problem by hand e.g., with
echo hi > foo.H
echo hi > foo.h-new
mv foo.h-new foo.h
mv: cannot move 'foo.h-new' to 'foo.h': File exists
strace output:
rename("/usr/include/linux/netfilter_ipv6/ip6t_HL.h.dpkg-new", "/usr/include/linux/netfilter_ipv6/ip6t_HL.h") = 0
open("/usr/include/linux/netfilter_ipv6/ip6t_hl.h.dpkg-new", O_WRONLY) = 10
fsync(10) = 0
close(10) = 0
rename("/usr/include/linux/netfilter_ipv6/ip6t_hl.h.dpkg-new", "/usr/include/linux/netfilter_ipv6/ip6t_hl.h") = -1 EEXIST (File exists)
write(2, "dpkg: error processing archive /"..., 199dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_4.4.0-98.121_amd64.deb (--install):
unable to install new version of '/usr/include/linux/netfilter_ipv6/ip6t_hl.h': File exists
) = 199
I had the same problem. Like #dmattp I found that it this is because, unfortunately, the package contains some (header) files with names that are distinct only by letter case, and that the wonderful WSL file system has an inconsistency regarding case sensitiveness.
Here is a workaround, assuming that the package has name linux-libc-dev_3.13.0-123.172_amd64.deb:
cd any-temp-dir
apt-get download linux-libc-dev
ar x linux-libc-dev_3.13.0-123.172_amd64.deb
tar xJf data.tar.xz # ignore all erors like ./usr/include/linux/netfilter_ipv4/ipt_ttl.h: Cannot open: Input/output error
tar cJf data.tar.xz ./usr
ar rcs linux-libc-dev_3.13.0-123.172_amd64-patched.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i linux-libc-dev_3.13.0-123.172_amd64-patched.deb
It says dependencies aren't being installed, so try:
sudo apt-get install linux-libc-dev
If that doesn't work try:
sudo apt-get install --reinstall build-essential
This will reinstall build-essential. Hope this helps, cheers!

Why does RHEL7.2 can not find the file 'libgmp.so.3()(64bit)'

I am installing Oracle 11g on the my system RHEL7.2 64bit,But in this step,I can not continue to install it,Because I can not find a file on my system,It is 'libgmp.so.3'.
So,like the picture,I can not install anything else.Because I had installed a higher level 'gmp' on my system.It is useless when I make a softlink to a higher level file.
What can I do?
try
yum clean all
this is will clear the yum cache .
Try first install mpfr-2.4.1-6.el6.x86_64.rpm
See http://www.oracle.com/technetwork/articles/servers-storage-admin/ginnydbinstallonlinux-488779.html. (It is for Oracle Linux 6.0, but it describes your problem)
# yum install oracle-rdbms-server-11gR2-preinstall
........
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
--> Running transaction check
---> Package kernel-uek-headers.x86_64 0:2.6.32-300.32.1.el6uek will be installed
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
Also see brief installation guide how to install libraries https://oracle-base.com/articles/11g/oracle-db-11gr2-installation-on-oracle-linux-7
And of course big installation guide if nothing has helped https://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#BHCFACHG

dpkg error: contains ununderstood data member

I'm trying to install a jailbreak tweak using make package install but I'm receiving this error from dpkg:
dpkg-deb: file `/tmp/_theos_install.deb' contains ununderstood data member data.tar.xz , giving up
dpkg: error processing /tmp/_theos_install.deb (--install):
subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Errors were encountered while processing:
/tmp/_theos_install.deb
make: *** [internal-install] Error 1
So as far as I can tell it isn't able to understand the .xz extension, but I'm not sure why that file is being created. Thanks for the help.
I found out how to fix it. In $THEOS/makefiles/package/deb.mk replace this line:
$(ECHO_NOTHING)COPYFILE_DISABLE=1 $(FAKEROOT) -r dpkg-deb -b "$(THEOS_STAGING_DIR)" "$(_THEOS_DEB_PACKAGE_FILENAME)" $(STDERR_NULL_REDIRECT)$(ECHO_END)
with this line:
$(ECHO_NOTHING)COPYFILE_DISABLE=1 $(FAKEROOT) -r dpkg-deb -Zgzip -b "$(THEOS_STAGING_DIR)" "$(_THEOS_DEB_PACKAGE_FILENAME)" $(STDERR_NULL_REDIRECT)$(ECHO_END)
The .deb file is created because you told Theos build system to do that. The package install rule of the Makefile is creating the Debian package using xz compression. Now, this kind of compression is supported by versions of dpkg equal or higher than 1.15.6.
So, in order to solve your problem, you should update dpkg to a newer version or install Theos without packaging support. Probably a simple make install will do it.
In case that updating dpkg isn't possible and you don't want to install the program without package management support, the other (more painful) method is to change the algorithm in which the package is compressed. Here you have good information about how to do this.
In my case I was building a package on Ubuntu 18.04 and trying to install that package on Debian 7 (airgapped). I had to change the line in the Makefile that read:
dpkg --build $(DESTDIR)
..to:
dpkg-deb --build -Zgzip $(DESTDIR)
Thanks Connor!
Other option that you can try is to unpack the .deb that you where triying to install and repack with no XZ compression.
Unpack:
mkdir package/ && dpkg -x package.deb package/
Pack:
dpkg-deb --build -Zgzip package/
You can rename the resulting package with:
dpkg-name -o package.deb
Or simply name the package dir with the name of your package.
Important: In orther to perform this, you need to install dpkg-dev package:
sudo apt update
sudo apt install dpkg-dev

Resources