I am trying to write a script that uses some not shell builtin commands (such as expect) and I am plannig to use it offline.
Normally, I can install expect in Fedora using sudo yum install expect or Ubuntu using sudo apt install expect.
But I want to download expect package and all it's depends using sudo apt-cache depends expect (after learning depends use...) sudo apt download <depends>.
I tried it and downloaded some .deb files. And I also tried this:
Extract
data.tarfiles from.debfiles ( I didn't want to usedpkg -i <some_pkg.deb>because I didn't succeded all time and I want to use it in Fedora -which is not usingdpkg-).Extract all files using
tar -xhf data.tar -C ~/demoFinally I manually copy all files in system dirs using
cp -rPn ~/demo/bin/* /bin ~/demo/etc/* /etc ...
But when I do this -espacially using this .deb type packages inside Fedora-, I got segmentation fault (core dumped) error and my system is dead.
I know I am trying not recommended and dangerous approach to achieve my goal, but is there a way to this (espacially backup a command eg. /usr/bin/expect and all its depends) to use it offline?
dpkgorapt? – May 26 '20 at 11:06