Score:0

bash:ls command not working

us flag

I upgrade to Ubuntu latest version (I think it is 22.04), during update it gave some errors.

dpkg: error processing package usrmerge (--configure):
 installed usrmerge package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 usrmerge

to fix it, I was running apt install usrmerge. It was complaining on couple of files as they were already existing. (it happened on couple of files, which I renamed target and continued rerunning it). When I ran the last time, it gave error as below.

FATAL ERROR: Both /lib64/ld-linux-x86-64.so.2 and /usr/lib64/ld-linux-x86-64.so.2 exist.

From then on wards, it is not recognizing any commands including ls commands.

I am new to Ubuntu, by reading some forums I tried to update path still not working. Any help is appreciated. I am stuck, if I restart, ubuntu may not work and scaredmwill lose all files.

root@VirtualBox:/usr/bin# export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:
root@VirtualBox:/usr/bin# ls
bash: /usr/bin/ls: No such file or directory
root@VirtualBox:/usr/bin# nano .bash_profile
bash: /usr/bin/nano: No such file or directory

Command Apt install Usrmerge output:

root@VirtualBox:/home/raj# apt install usrmerge
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
usrmerge is already the newest version (25ubuntu2).
The following packages were automatically installed and are no longer required:
  bluefish-plugins dvd+rw-tools g++-9 g++-9-multilib gcc-10-base gcc-10-base:i386 gir1.2-gnomebluetooth-1.0
  gir1.2-handy-0.0 gir1.2-tracker-2.0 gir1.2-zpj-0.0 growisofs hddtemp lib32stdc++-9-dev libamtk-5-0
  libamtk-5-common libaom0 libasync-mergepoint-perl libbasicusageenvironment1 libboost-date-time1.71.0
  libboost-iostreams1.71.0 libboost-locale1.71.0 libboost-thread1.71.0 libbrlapi0.7 libcamel-1.2-62
  libcbor0.6 libcdio18 libcodec2-0.9 libdc1394-22 libdns-export1109 libdvdread7 libebml4v5
  libedataserver-1.2-24 libedataserverui-1.2-2 libextutils-pkgconfig-perl libfluidsynth2 libfuture-perl
  libfwupdplugin1 libgit2-28 libgroupsock8 libgupnp-1.2-0 libhandy-0.0-0 libhogweed5 libigdgmm11
  libilmbase24 libio-async-loop-epoll-perl libio-async-perl libjson-c4 libjuh-java libjurt-java
  liblibreoffice-java liblinux-epoll-perl liblivemedia77 libllvm12 libmatroska6v5 libmbedcrypto3
  libmbedtls12 libmbedx509-0 libmetrics-any-perl libmms0 libmozjs-68-0 libmusicbrainz5-2
  libmusicbrainz5cc2v5 libmysqlclient21 libnettle7 libntfs-3g883 libodbc1 libofa0 libopenexr24
  liborcus-0.15-0 libpgm-5.2-0 libphonenumber7 libplacebo7 libpoppler97 libprotobuf17 libpython2-stdlib
  libpython3.8 libpython3.8-minimal libpython3.8-stdlib libqpdf26 libqt5concurrent5 libquvi-0.9-0.9.3
  libquvi-scripts-0.9 libraw19 libreadonly-perl libref-util-perl libref-util-xs-perl
  libreoffice-style-tango libridl-java librpm8 librpmbuild8 librpmio8 librpmsign8 libsane libsereal-perl
  libsrt1 libstdc++-9-dev libstruct-dumb-perl libtepl-4-0 libtest-fatal-perl libtest-metrics-any-perl
  libtest-refcount-perl libtotem-plparser-videosite libtracker-control-2.0-0 libtracker-miner-2.0-0
  libtracker-sparql-2.0-0 libtype-tiny-perl libtype-tiny-xs-perl libunoloader-java libusageenvironment3
  libusrsctp1 libvpx6 libwebp6 libx264-155 libx265-179 libx32stdc++-9-dev libxml-writer-perl libxmlb1
  lua-bitop lua-expat lua-json lua-lpeg lua-socket lz4 mysql-common odbcinst odbcinst1debian2 python2
  python2-minimal python3-entrypoints python3-requests-unixsocket python3-simplejson python3-sip python3.8
  python3.8-minimal ruby2.7 unoconv ure-java
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.

FATAL ERROR:
Both /lib64/ld-linux-x86-64.so.2 and /usr/lib64/ld-linux-x86-64.so.2 exist.

You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.

dpkg: error processing package usrmerge (--configure):
 installed usrmerge package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@VirtualBox:/home/raj# apt install usrmerge
bash: /usr/bin/apt: No such file or directory
vanadium avatar
cn flag
You can never be scared for loosing files because you have a backup of the files you care for. If not, then first thing, boot into a live CD and make a backup copy of your user files. Anything can go wrong anytime, so you should have backups anytime, especially before attempting an upgrade. What is the version you upgraded from?
Murthy Bhavaraju avatar
us flag
i think i am upgrading from 20.xx. i have ubuntu on my virtual machine.
vanadium avatar
cn flag
I think at this stage you may salvage the system by a reinstall "in place" using the live DVD. This means you do a custom install, manually assign the partitions and indicate partitions should *not* be formatted: that rewrites the entire system, but leaves configuration and user files in place.
Murthy Bhavaraju avatar
us flag
Vanadium, Thanks for responding. dont have DVD/CD, is there any version(link) that i can download and install from Local system?
vanadium avatar
cn flag
An install in place is best the same version as the current broken version. So download the ISO of 22.04 and start your virtual machine with that ISO.
Murthy Bhavaraju avatar
us flag
Vanadium,thanks for the suggestion. when i am trying to install it gives me option to choose partitions.
Murthy Bhavaraju avatar
us flag
Vanadium, thanks for the suggestion. when I am trying to install it gives me option to choose partitions. here is what I am seeing. Device Type Mount Point Format? Size Used System ---------------- ------ -------------- --------- ------ ------ --------- /dev/mapper/ubuntu-vg-root /dev/mapper/ubuntu-vg-root ext4 105784 MB Unknown Linux Device-mapper(LI /dev/mapper/ubuntu-vg-swap_1 /dev/mapper/ubuntu-vg-swap_1 swap 1073 MB Unknown /dev/sda /dev/sda1 ext2 510 MB 261 MB /dev/sda5 106860 MB unknown
Murthy Bhavaraju avatar
us flag
Which option can I choose so I don't lose my data. There is no Mount point in it and there is no EFI Type in it
vanadium avatar
cn flag
First backup your data. Even if you correctly reinstall, the chance something goes wrong is there.
Murthy Bhavaraju avatar
us flag
Thanks Vanadium, I can't backup right now, I am out of ubuntu and only can try my best and hope partition stays intact. I can't login to UBUNTU any more.
vanadium avatar
cn flag
You should work from a live session. Of course, if the partition would be damaged, backup will not anymore be possible.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.