Home > Enterprise >  How to install a software management tool in Linux?
How to install a software management tool in Linux?

Time:09-28

I am using a Linux OS in a router.

With the uname -a command, I get the following information:

Linux K2P 3.4.113 #3 SMP Sun May 31 11:22:25 CST 2020 mips GNU/Linux

And through command cat /proc/version, I get:

Linux version 3.4.113 (padavan@hms) (gcc version 4.4.7 (GCC) ) #3 SMP Sun May 31 11:22:25 CST 2020

And:

[K2P /etc]# cat /proc/version
Linux version 3.4.113 (padavan@hms) (gcc version 4.4.7 (GCC) ) #3 SMP Sun May 31 11:22:25 CST 2020

But I have no idea which distribution of Linux I am on.

I wanna install python3 in this OS, so I type:

sudo apt-get install python3

But I got:

-sh: apt-get: not found

Same thing goes with yum, dpkg, opkg, ipkg and rpm.

I don't think there is a software management tool on this operating system.

So how can I install a software management tool in this case?

More Information:

[K2P /home/root]# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime,size=8k)
tmpfs on /etc type tmpfs (rw,noatime,size=4096k)
tmpfs on /home type tmpfs (rw,relatime,size=1024k)
tmpfs on /media type tmpfs (rw,relatime,size=8k)
tmpfs on /mnt type tmpfs (rw,relatime,size=8k)
tmpfs on /tmp type tmpfs (rw,relatime,size=62464k)
tmpfs on /var type tmpfs (rw,relatime,size=4096k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
tmpfs on /opt type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app07.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app21.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app08.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app09.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app12.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app16.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app20.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app10.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app11.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app01.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app14.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app15.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app19.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app05.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app05.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app03.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app04.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app17.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app06.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app02.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app13.asp type tmpfs (rw,relatime,size=62464k)
tmpfs on /www/Advanced_Extensions_app18.asp type tmpfs (rw,relatime,size=62464k)

Update: I have installed BusyBox.

BusyBox v1.29.3 (2020-05-03 02:38:43 CST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as.

Currently defined functions:
        addgroup, adduser, arp, arping, ash, awk, base64, basename, bash, brctl, bunzip2, bzcat, bzip2, cat, chgrp, chmod,
        chown, chpasswd, chroot, clear, cp, crond, crontab, cut, date, dd, df, dhcp6c, dirname, dmesg, dnsdomainname, dos2unix,
        du, echo, egrep, env, ether-wake, expr, false, fgrep, find, flock, free, fuser, getopt, grep, gunzip, gzip, head,
        hostname, ifconfig, inetd, insmod, kill, killall, klogd, less, ln, logger, login, losetup, ls, lsmod, lsof, md5sum,
        mdev, mkdir, mknod, modprobe, more, mount, mountpoint, mv, netstat, nice, nohup, nslookup, ntpd, passwd, pgrep, pidof,
        ping, ping6, printf, ps, pstree, pwd, renice, rm, rmdir, rmmod, route, sed, sendmail, seq, sh, sleep, sort,
        start-stop-daemon, stat, strings, su, switch_root, sync, sysctl, syslogd, tail, tar, taskset, tee, telnetd, test, time,
        top, touch, tr, traceroute, traceroute6, true, udhcpc, umount, uname, uniq, unix2dos, unlink, uptime, usleep, vconfig,
        vi, watch, wc, wget, which, whoami, xargs, yes, zcat, zcip

But I still didn't find any package management commands in it.

CodePudding user response:

Use cat /etc/*release. Usually there is a /etc/os-release file with enough information. It could reside in another release file, so the star character could be helpful.

Once you have the Linux distribution, you will surely find the way to install software (if any).

If this is an OS without any package manager, I’m afraid you cannot install one.

But: installing python from source by compiling is not that hard (or long). You could use a compiler if there is one in your router. If there is not you can cross-compile from a complete Linux computer. This is harder, especially if your processor type is different.

CodePudding user response:

You cant.
A Router is an embedded Device and the Filesystem is (normally) readonly.
Or not?
Post the Output of: mount
(without an Argument)
...to see it.

If your Filesystem is read/write try to download (with wget) a busybox.
This Binary has many commands for your system.
That will be shown simply by typing busybox...

BusyBox v1.21.1 (2013-07-08 11:34:59 CDT) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   or: function [arguments]...

    BusyBox is a multi-call binary that combines many common Unix
    utilities into a single executable.  Most people will create a
    link to busybox for each function they wish to use and BusyBox
    will act like whatever it was invoked as.

Currently defined functions:
    [, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash, awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat,
    chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd, deallocvt,
    delgroup, deluser, depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid,
    ether-wake, expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk, fsck, fsck.minix, fsync,
    ftpd, ftpget, ftpput, fuser, getopt, getty, grep, groups, gunzip, gzip, halt, hd, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave,
    ifplugd, ifup, inetd, init, insmod, install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, last,
    less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lsof, lspci, lsusb, lzcat, lzma, lzop, lzopcat,
    makedevs, makemime, man, md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more,
    mount, mountpoint, mpstat, mt, mv, nameif, nanddump, nandwrite, nbd-client, nc, netstat, nice, nmeter, nohup, nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof, ping, ping6,
    pipe_progress, pivot_root, pkill, pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdate, rdev, readahead, readlink, readprofile,
    realpath, reboot, reformime, remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script,
    scriptreplay, sed, sendmail, seq, setarch, setconsole, setfont, setkeycodes, setlogcons, setserial, setsid, setuidgid, sh, sha1sum, sha256sum, sha3sum, sha512sum, showkey, slattach,
    sleep, smemcap, softlimit, sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar,
    tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true, tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd, umount, uname, unexpand,
    uniq, unix2dos, unlzma, unlzop, unxz, unzip, uptime, users, usleep, uudecode, uuencode, vconfig, vi, vlock, volname, wall, watch, watchdog, wc, wget, which, who, whoami, whois,
    xargs, xz, xzcat, yes, zcat, zcip
  • Related