reading from sensors based on softlinks - linux-device-driver

How do I read from these sensors? I just found their location, but the folder appears to contain softlinks to another location. My goal is to monitor the gyroscope.
$ ls /sys/bus/iio/devices/iio:device*
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200073.1.auto/iio:device0
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200076.2.auto/iio:device1
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device2 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200083.3.auto/iio:device2
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device3 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200086.4.auto/iio:device3
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device4 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-20008a.5.auto/iio:device4
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device5 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200041.6.auto/iio:device5

Using cat:
$ cat /sys/bus/iio/devices/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200073.1.auto/iio:device0
Here is a nice presentation on IIO subsystem.

Related

OpemBMC/Yocto Glibc do_package fails

I am new to OpenBMC/Yocto.
For glibc target, the previous tasks such as do_compile() etc work fine, but fail at do_package() task:
bruin#cl2100 /ssd/devkit/build (master) $ bitbake glibc -c package
WARNING: Layer ast2600-devkit should set LAYERSERIES_COMPAT_ast2600-devkit in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer ast2600-devkit should set LAYERSERIES_COMPAT_ast2600-devkit in its conf/layer.conf file to list the core layer names it is compatible with.
Loading cache: 100% |#############################################################################################################| Time: 0:00:01
Loaded 3353 entries from dependency cache.
Parsing recipes: 100% |###########################################################################################################| Time: 0:00:04
Parsing of 2344 .bb files complete (2274 cached, 70 parsed). 3429 targets, 339 skipped, 0 masked, 0 errors.
WARNING: No bb files matched BBFILE_PATTERN_ast2600-devkit ''
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.42.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "debian-11"
TARGET_SYS = "arm-openbmc-linux-gnueabi"
MACHINE = "ast2600-devkit"
DISTRO = "openbmc-phosphor"
DISTRO_VERSION = "0.1.0"
TUNE_FEATURES = "arm armv7a vfp vfpv4d16 callconvention-hard"
TARGET_FPU = "hard"
meta
meta-poky
meta-oe
meta-networking
meta-python
meta-webserver
meta-phosphor
meta-aspeed
meta-ami
meta-ast2600-devkit = "master:0a8a6b7628d866c20ac674a213fcba68e34a33c4"
Initialising tasks: 100% |########################################################################################################| Time: 0:00:01
Sstate summary: Wanted 2 Found 1 Missed 1 Current 55 (50% match, 98% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: glibc-2.29-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:perform_packagecopy(d)
0003:
File: '/ssd/devkit/meta/classes/package.bbclass', lineno: 662, function: perform_packagecopy
0658: rpath_replace (dvar, d)
0659:}
0660:perform_packagecopy[cleandirs] = "${PKGD}"
0661:perform_packagecopy[dirs] = "${PKGD}"
*** 0662:
0663:# We generate a master list of directories to process, we start by
0664:# seeding this list with reasonable defaults, then load from
0665:# the fs-perms.txt files
0666:python fixup_perms () {
File: '/usr/lib/python3.9/subprocess.py', lineno: 424, function: check_output
0420: else:
0421: empty = b''
0422: kwargs['input'] = empty
0423:
*** 0424: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
0425: **kwargs).stdout
0426:
0427:
0428:class CompletedProcess(object):
File: '/usr/lib/python3.9/subprocess.py', lineno: 528, function: run
0524: # We don't call process.wait() as .__exit__ does that for us.
0525: raise
0526: retcode = process.poll()
0527: if check and retcode:
*** 0528: raise CalledProcessError(retcode, process.args,
0529: output=stdout, stderr=stderr)
0530: return CompletedProcess(process.args, retcode, stdout, stderr)
0531:
0532:
Exception: subprocess.CalledProcessError: Command 'tar -cf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/image -p -S . | tar -xf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/package' returned non-zero exit status 2.
Subprocess output:
tar: ./lib/libpthread.so.0: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/librt.so.1: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/libdl.so.2: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/libnss_db.so.2: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/ld-linux-armhf.so.3: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/libnss_compat.so.2: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/libnsl.so.1: Cannot change mode to rwxrwxrwx: No such file or directory
tar: Exiting with failure status due to previous errors
ERROR: glibc-2.29-r0 do_package: Command 'tar -cf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/image -p -S . | tar -xf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/package' returned non-zero exit status 2.
ERROR: glibc-2.29-r0 do_package: Function failed: perform_packagecopy
ERROR: Logfile of failure stored in: /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/temp/log.do_package.2941902
ERROR: Task (/ssd/devkit/meta/recipes-core/glibc/glibc_2.29.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 431 tasks of which 430 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/ssd/devkit/meta/recipes-core/glibc/glibc_2.29.bb:do_package
Summary: There were 3 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
It shows that the tar exit code is 2: but when I execute the command (tar -cf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/image -p -S . | tar -xf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/package) in shell, the exit code is 0 without errors.
It complains that some files are not found: but there are existing in both src/dst folders, as symlinks:
$ ls -la /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/image/lib
total 25836
drwxr-xr-x 3 bruin bruin 4096 Jan 28 21:16 .
drwxr-xr-x 7 bruin bruin 4096 Jan 28 21:16 ..
-rwxr-xr-x 1 bruin bruin 1342112 Jan 28 21:16 ld-2.29.so
lrwxrwxrwx 1 bruin bruin 10 Jan 28 21:16 ld-linux-armhf.so.3 -> ld-2.29.so
-rwxr-xr-x 1 bruin bruin 132860 Jan 28 21:16 libanl-2.29.so
lrwxrwxrwx 1 bruin bruin 14 Jan 28 21:16 libanl.so.1 -> libanl-2.29.so
-rwxr-xr-x 1 bruin bruin 24772 Jan 28 21:14 libBrokenLocale-2.29.so
lrwxrwxrwx 1 bruin bruin 23 Jan 28 21:14 libBrokenLocale.so.1 -> libBrokenLocale-2.29.so
-rwxr-xr-x 1 bruin bruin 16277872 Jan 28 21:16 libc-2.29.so
lrwxrwxrwx 1 bruin bruin 12 Jan 28 21:15 libc.so.6 -> libc-2.29.so
-rwxr-xr-x 1 bruin bruin 223884 Jan 28 21:15 libdl-2.29.so
lrwxrwxrwx 1 bruin bruin 13 Jan 28 21:15 libdl.so.2 -> libdl-2.29.so
-rwxr-xr-x 1 bruin bruin 2241936 Jan 28 21:15 libm-2.29.so
-rwxr-xr-x 1 bruin bruin 83116 Jan 28 21:15 libmemusage.so
lrwxrwxrwx 1 bruin bruin 12 Jan 28 21:15 libm.so.6 -> libm-2.29.so
-rwxr-xr-x 1 bruin bruin 718332 Jan 28 21:16 libnsl-2.29.so
lrwxrwxrwx 1 bruin bruin 14 Jan 28 21:16 libnsl.so.1 -> libnsl-2.29.so
-rwxr-xr-x 1 bruin bruin 178048 Jan 28 21:16 libnss_compat-2.29.so
lrwxrwxrwx 1 bruin bruin 21 Jan 28 21:16 libnss_compat.so.2 -> libnss_compat-2.29.so
-rwxr-xr-x 1 bruin bruin 261964 Jan 28 21:16 libnss_db-2.29.so
lrwxrwxrwx 1 bruin bruin 17 Jan 28 21:16 libnss_db.so.2 -> libnss_db-2.29.so
-rwxr-xr-x 1 bruin bruin 121324 Jan 28 21:16 libnss_dns-2.29.so
lrwxrwxrwx 1 bruin bruin 18 Jan 28 21:16 libnss_dns.so.2 -> libnss_dns-2.29.so
-rwxr-xr-x 1 bruin bruin 371120 Jan 28 21:16 libnss_files-2.29.so
lrwxrwxrwx 1 bruin bruin 20 Jan 28 21:16 libnss_files.so.2 -> libnss_files-2.29.so
-rwxr-xr-x 1 bruin bruin 114772 Jan 28 21:16 libnss_hesiod-2.29.so
lrwxrwxrwx 1 bruin bruin 21 Jan 28 21:16 libnss_hesiod.so.2 -> libnss_hesiod-2.29.so
-rwxr-xr-x 1 bruin bruin 11888 Jan 28 21:16 libpcprofile.so
-rwxr-xr-x 1 bruin bruin 2755760 Jan 28 21:15 libpthread-2.29.so
lrwxrwxrwx 1 bruin bruin 18 Jan 28 21:15 libpthread.so.0 -> libpthread-2.29.so
-rwxr-xr-x 1 bruin bruin 434272 Jan 28 21:16 libresolv-2.29.so
lrwxrwxrwx 1 bruin bruin 17 Jan 28 21:16 libresolv.so.2 -> libresolv-2.29.so
-rwxr-xr-x 1 bruin bruin 423408 Jan 28 21:16 librt-2.29.so
lrwxrwxrwx 1 bruin bruin 13 Jan 28 21:16 librt.so.1 -> librt-2.29.so
-rwxr-xr-x 1 bruin bruin 62072 Jan 28 21:16 libSegFault.so
-rwxr-xr-x 1 bruin bruin 580432 Jan 28 21:16 libthread_db-1.0.so
lrwxrwxrwx 1 bruin bruin 19 Jan 28 21:16 libthread_db.so.1 -> libthread_db-1.0.so
-rwxr-xr-x 1 bruin bruin 39564 Jan 28 21:16 libutil-2.29.so
lrwxrwxrwx 1 bruin bruin 15 Jan 28 21:16 libutil.so.1 -> libutil-2.29.so
drwxr-xr-x 3 bruin bruin 4096 Jan 28 21:16 systemd
$ ls -la /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/package/lib
total 25836
drwxr-xr-x 3 bruin bruin 4096 Jan 28 21:16 .
drwxr-xr-x 7 bruin bruin 4096 Jan 28 21:16 ..
-rwxr-xr-x 1 bruin bruin 1342112 Jan 28 21:16 ld-2.29.so
lrwxrwxrwx 1 bruin bruin 10 Jan 28 21:16 ld-linux-armhf.so.3 -> ld-2.29.so
-rwxr-xr-x 1 bruin bruin 132860 Jan 28 21:16 libanl-2.29.so
lrwxrwxrwx 1 bruin bruin 14 Jan 28 21:16 libanl.so.1 -> libanl-2.29.so
-rwxr-xr-x 1 bruin bruin 24772 Jan 28 21:14 libBrokenLocale-2.29.so
lrwxrwxrwx 1 bruin bruin 23 Jan 28 21:14 libBrokenLocale.so.1 -> libBrokenLocale-2.29.so
-rwxr-xr-x 1 bruin bruin 16277872 Jan 28 21:16 libc-2.29.so
lrwxrwxrwx 1 bruin bruin 12 Jan 28 21:15 libc.so.6 -> libc-2.29.so
-rwxr-xr-x 1 bruin bruin 223884 Jan 28 21:15 libdl-2.29.so
lrwxrwxrwx 1 bruin bruin 13 Jan 28 21:15 libdl.so.2 -> libdl-2.29.so
-rwxr-xr-x 1 bruin bruin 2241936 Jan 28 21:15 libm-2.29.so
-rwxr-xr-x 1 bruin bruin 83116 Jan 28 21:15 libmemusage.so
lrwxrwxrwx 1 bruin bruin 12 Jan 28 21:15 libm.so.6 -> libm-2.29.so
-rwxr-xr-x 1 bruin bruin 718332 Jan 28 21:16 libnsl-2.29.so
lrwxrwxrwx 1 bruin bruin 14 Jan 28 21:16 libnsl.so.1 -> libnsl-2.29.so
-rwxr-xr-x 1 bruin bruin 178048 Jan 28 21:16 libnss_compat-2.29.so
lrwxrwxrwx 1 bruin bruin 21 Jan 28 21:16 libnss_compat.so.2 -> libnss_compat-2.29.so
-rwxr-xr-x 1 bruin bruin 261964 Jan 28 21:16 libnss_db-2.29.so
lrwxrwxrwx 1 bruin bruin 17 Jan 28 21:16 libnss_db.so.2 -> libnss_db-2.29.so
-rwxr-xr-x 1 bruin bruin 121324 Jan 28 21:16 libnss_dns-2.29.so
lrwxrwxrwx 1 bruin bruin 18 Jan 28 21:16 libnss_dns.so.2 -> libnss_dns-2.29.so
-rwxr-xr-x 1 bruin bruin 371120 Jan 28 21:16 libnss_files-2.29.so
lrwxrwxrwx 1 bruin bruin 20 Jan 28 21:16 libnss_files.so.2 -> libnss_files-2.29.so
-rwxr-xr-x 1 bruin bruin 114772 Jan 28 21:16 libnss_hesiod-2.29.so
lrwxrwxrwx 1 bruin bruin 21 Jan 28 21:16 libnss_hesiod.so.2 -> libnss_hesiod-2.29.so
-rwxr-xr-x 1 bruin bruin 11888 Jan 28 21:16 libpcprofile.so
-rwxr-xr-x 1 bruin bruin 2755760 Jan 28 21:15 libpthread-2.29.so
lrwxrwxrwx 1 bruin bruin 18 Jan 28 21:15 libpthread.so.0 -> libpthread-2.29.so
-rwxr-xr-x 1 bruin bruin 434272 Jan 28 21:16 libresolv-2.29.so
lrwxrwxrwx 1 bruin bruin 17 Jan 28 21:16 libresolv.so.2 -> libresolv-2.29.so
-rwxr-xr-x 1 bruin bruin 423408 Jan 28 21:16 librt-2.29.so
lrwxrwxrwx 1 bruin bruin 13 Jan 28 21:16 librt.so.1 -> librt-2.29.so
-rwxr-xr-x 1 bruin bruin 62072 Jan 28 21:16 libSegFault.so
-rwxr-xr-x 1 bruin bruin 580432 Jan 28 21:16 libthread_db-1.0.so
lrwxrwxrwx 1 bruin bruin 19 Jan 28 21:16 libthread_db.so.1 -> libthread_db-1.0.so
-rwxr-xr-x 1 bruin bruin 39564 Jan 28 21:16 libutil-2.29.so
lrwxrwxrwx 1 bruin bruin 15 Jan 28 21:16 libutil.so.1 -> libutil-2.29.so
drwxr-xr-x 3 bruin bruin 4096 Jan 28 21:16 systemd
Where should I look to for causes/solutions? Thanks!
The issues look like issues in the pseudo fakeroot emulation.
Going off https://wiki.yoctoproject.org/wiki/Releases bitbake 1.42 is based on the warrior series which in from 2019 and EOL in June 2020. It is unlikely a build that old was ever tested on a recent distro like Debian 11 that you're building on now. I'd suggest building something more recent or using an older host distro.

Using configmap make container keep creating directories

I am using configmaps to populate configuration of few services. One container though is having a weird behavior. Several directories are created upon instanciation and then new ones every 2 minutes:
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_49.335148891
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_52.091968736
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_53.797898431
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_54.421758226
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_56.209637705
0 drwxr-xr-x 4 root root 90 Feb 15 14:46 ..2982_15_02_14_46_00.970889748
0 drwxr-xr-x 4 root root 90 Feb 15 14:46 ..2982_15_02_14_46_08.301261923
[..]
0 drwxr-xr-x 4 root root 90 Feb 15 15:22 ..2982_15_02_15_22_01.877596759
0 drwxr-xr-x 4 root root 90 Feb 15 15:24 ..2982_15_02_15_24_01.626300874
0 drwxr-xr-x 4 root root 90 Feb 15 15:26 ..2982_15_02_15_26_01.042779297
0 drwxr-xr-x 4 root root 90 Feb 15 15:28 ..2982_15_02_15_28_01.708510604
0 drwxr-xr-x 4 root root 90 Feb 15 15:30 ..2982_15_02_15_30_01.032055163
0 drwxr-xr-x 4 root root 90 Feb 15 15:32 ..2982_15_02_15_32_01.089879198
0 drwxr-xr-x 4 root root 90 Feb 15 15:34 ..2982_15_02_15_34_02.798668133
0 lrwxrwxrwx 1 root root 31 Feb 15 15:34 ..data -> ..2982_15_02_15_34_02.798668133
4 drwxr-xr-x 2 root root 4096 Feb 15 14:45 apps.d
4 drwxr-xr-x 2 root root 4096 Feb 15 14:45 conf.d
0 lrwxrwxrwx 1 root root 21 Feb 15 14:45 fastcgi-params -> ..data/fastcgi-params
0 lrwxrwxrwx 1 root root 20 Feb 15 14:45 frontend.conf -> ..data/frontend.conf
0 lrwxrwxrwx 1 root root 17 Feb 15 14:45 nginx.conf -> ..data/nginx.conf
0 drwxrwxrwt 3 root root 120 Feb 15 14:45 ssl
YAML looks like this:
volumeMounts:
[..]
- name: default-nginx-config
mountPath: /etc/nginx
- name: default-nginx-slash-srv
mountPath: /srv
volumes:
[..]
- name: default-nginx-config
configMap:
name: web-frontend-default
items:
- key: fastcgi-params
path: fastcgi-params
- key: frontend.conf
path: frontend.conf
- key: nginx.conf
path: nginx.conf
- key: internal.conf
path: conf.d/internal.conf
- key: common-static-app.conf
path: conf.d/common-static-app.conf
- key: common-backends.conf
path: conf.d/common-backends.conf
- key: common-dynamic-app.conf
path: conf.d/common-dynamic-app.conf
- key: 00-generic.conf
path: apps.d/00-generic.conf
- key: default.conf
path: apps.d/default.conf
- name: default-nginx-slash-srv
configMap:
name: web-frontend-default
items:
- key: probe.html
path: probe.html
Any hint will be, of course, much appreciated :-)
Thank you
Well fixed :-)
Problem was two volumes mounted in the same target directory. k8s doesn't seem to like it.
Thank you Eric!
I was also having issues with two files being accessed before they were fully mounted. The workaround was making my ENTRYPOINT a bash script that simply moved them from the mount directory in the root level, to the actual file location they were being used, then calling the program binary.

How to view the section layout info recorded in an ELF file?

Suppose the following linker script is used to layout an executable file.
SECTIONS
{
. = 0x10000;
.text : { *(.text) }
.data : { *(.data) }
.bss : { *(.bss) }
}
OUTPUT_FORMAT(ELF)
My questions are:
I think such layout info must be stored in the output ELF file so the loader can load the executable based on that info. Right?
If 1 is true, how to view such layout info in a ELF? objdump?
I think such layout info must be stored in the output ELF file so the loader can load the executable based on that info. Right?
ELF stands for executable and linking format.
The .text, .data etc. are part of the linking format. While they usually are present in the fully-linked binary, they can be stripped.
The info that the loader needs to load the executable is stored as a table of segments (Elf{36,64}_Phdr[]).
If 1 is true, how to view such layout info in a ELF? objdump?
You can examine segments (and, if the optional section table is present, the mapping of sections to segments) with readelf -Wl a.out.
You can deduce the information from the linker command script by taking a look at the output of the -S option in readelf.
$ readelf -S $(which ls)
There are 28 section headers, starting at offset 0x1f6f8:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .interp PROGBITS 0000000000400238 00000238
000000000000001c 0000000000000000 A 0 0 1
[ 2] .note.ABI-tag NOTE 0000000000400254 00000254
0000000000000020 0000000000000000 A 0 0 4
[ 3] .note.gnu.build-i NOTE 0000000000400274 00000274
0000000000000024 0000000000000000 A 0 0 4
[ 4] .gnu.hash GNU_HASH 0000000000400298 00000298
0000000000000104 0000000000000000 A 5 0 8
[ 5] .dynsym DYNSYM 00000000004003a0 000003a0
0000000000000c48 0000000000000018 A 6 1 8
[ 6] .dynstr STRTAB 0000000000400fe8 00000fe8
0000000000000582 0000000000000000 A 0 0 1
[ 7] .gnu.version VERSYM 000000000040156a 0000156a
...
If you want to know where this comes from, take a look at the default linker command scripts for your toolchain; this default is used if you did not explicitly create your own. I think there may be some inheritance between them as well, but I can't say for certain.
$ ls -l /usr/lib/ldscripts/ | grep elf
-rw-r--r-- 1 root root 9027 Mar 22 04:05 elf32_x86_64.x
-rw-r--r-- 1 root root 8880 Mar 22 04:05 elf32_x86_64.xbn
-rw-r--r-- 1 root root 8706 Mar 22 04:05 elf32_x86_64.xc
-rw-r--r-- 1 root root 9024 Mar 22 04:05 elf32_x86_64.xd
-rw-r--r-- 1 root root 8720 Mar 22 04:05 elf32_x86_64.xdc
-rw-r--r-- 1 root root 8680 Mar 22 04:05 elf32_x86_64.xdw
-rw-r--r-- 1 root root 9027 Mar 22 04:05 elf32_x86_64.xn
-rw-r--r-- 1 root root 5443 Mar 22 04:05 elf32_x86_64.xr
-rw-r--r-- 1 root root 8551 Mar 22 04:05 elf32_x86_64.xs
-rw-r--r-- 1 root root 8247 Mar 22 04:05 elf32_x86_64.xsc
-rw-r--r-- 1 root root 8207 Mar 22 04:05 elf32_x86_64.xsw
-rw-r--r-- 1 root root 5489 Mar 22 04:05 elf32_x86_64.xu
-rw-r--r-- 1 root root 8666 Mar 22 04:05 elf32_x86_64.xw
-rw-r--r-- 1 root root 8396 Mar 22 04:05 elf_i386.x
-rw-r--r-- 1 root root 8249 Mar 22 04:05 elf_i386.xbn
-rw-r--r-- 1 root root 8209 Mar 22 04:05 elf_i386.xc
-rw-r--r-- 1 root root 8389 Mar 22 04:05 elf_i386.xd
-rw-r--r-- 1 root root 8219 Mar 22 04:05 elf_i386.xdc
...
I searched a bit and found something.
For 1. According ELF format on wikipedia, there are program headers that record the address layout info.
For 2. readelf is a promising tool.

Insert newline in html format using Powershell

I have the string value that has
. I want replace this with \n. and when I convert it to html format after each line comes to another line. But this not work.
$StdOut = 'total 40
drwxr-xr-x 3 root root 4096 Jun 16 14:55 .
drwxr-xr-x 5 root root 4096 Jun 16 14:54 ..
-rw------- 1 root root 0 Jun 16 14:55 cimserver_start.lock
srwxrwxrwx 1 root root 0
Jun 16 14:55 cim.socket
drwxr-xr-x 2 root root 4096 Jun 16 17:58 localauth
-rw------- 1 root root 6 Jun 16 14:55 scx-cimd.pid
'
$CResult = $StdOut -replace "
", "\n"
After using Convert-html I have the text like this :
'total 40\ndrwxr-xr-x 3 root root 4096 Jun 16 14:55 .\ndrwxr-xr-x 5 root root 4096 Jun 16 14:54 ..\n-rw------- 1 root root 0 Jun 16 14:55 cimserver_start.lock\nsrwxrwxrwx 1 root root 0 Jun 16 14:55
cim.socket\ndrwxr-xr-x 2 root root 4096 Jun 16 17:58 localauth\n-rw------- 1 root root 6 Jun 16 14:55 scx-cimd.pid\n
'
How can I do this?
The approach Mathias mentions works fine for newlines. But if you have (or could have) other entity refs then I would use the HtmlDecode method e.g.
Add-Assembly System.Web
[System.Web.HttpUtility]::HtmlDecode($StdOut)
Outputs:
total 40
drwxr-xr-x 3 root root 4096 Jun 16 14:55 .
drwxr-xr-x 5 root root 4096 Jun 16 14:54 ..
-rw------- 1 root root 0 Jun 16 14:55 cimserver_start.lock
srwxrwxrwx 1 root root 0
PS C:\WINDOWS\system32> Add-Assembly System.Web
Add-Assembly : The term 'Add-Assembly' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of
the name, or if
a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Add-Assembly System.Web
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-Assembly:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Try this
$null = [Reflection.Assembly]::LoadWithPartialName('System.Web')
[System.Web.HttpUtility]::HtmlDecode($StdOut)
Gives me
total 40
drwxr-xr-x 3 root root 4096 Jun 16 14:55 .
drwxr-xr-x 5 root root 4096 Jun 16 14:54 ..
-rw------- 1 root root 0 Jun 16 14:55 cimserver_start.lock
srwxrwxrwx 1 root root 0

Mongo exit code 45, can't start mongod, MongoDB cannot open or obtain a lock on a file

My Meteor application keeps crashing with this message when I type mrt (mrt should start the Meteor application):
Unexpected mongo exit code 45. Restarting.
Unexpected mongo exit code 45. Restarting.
Unexpected mongo exit code 45. Restarting.
Can't start mongod
MongoDB cannot open or obtain a lock on a file
Doing it with sudo mrt, it works.
I got to this error after fixing other erros. I fixed the errors I got before by typing:
sudo chmod -R 777 ./
Before, I had other errors. But now I do not know what it could be as there shouldn't be differences between root and my user in that directory.
For Non-Meteor users: Meteor has a little mongodb in its .meteor directory.
What could be the reason?
This is the requested output from ls -Rl .meteor/ | grep root executed as a normal user :
drwxrwxrwx 4 root root 4096 Jan 3 19:59 local
-rwxrwxrwx 1 root root 220 Jan 3 11:51 packages
-rwxrwxrwx 1 root root 8 Dec 29 12:35 release
drwxrwxrwx 4 root root 4096 Jan 3 19:59 build
drwxrwxrwx 2 vagrant root 4096 Dec 29 12:39 db
-rwxrwxrwx 1 root root 151 Jan 3 19:59 main.js
drwxrwxrwx 5 root root 4096 Jan 3 19:59 programs
-rwxrwxrwx 1 root root 650 Jan 3 19:59 README
drwxrwxrwx 2 root root 4096 Jan 3 19:59 server
-rwxrwxrwx 1 root root 459 Jan 3 19:59 star.json
drwxrwxrwx 4 root root 4096 Jan 3 19:59 client
drwxrwxrwx 4 root root 4096 Jan 3 19:59 ctl
drwxrwxrwx 5 root root 4096 Jan 3 19:59 server
drwxrwxrwx 3 root root 4096 Jan 3 19:59 app
-rwxrwxrwx 1 root root 5836 Jan 3 19:59 app.html
drwxrwxrwx 2 root root 4096 Jan 3 19:59 packages
-rwxrwxrwx 1 root root 16184 Jan 3 19:59 program.json
drwxrwxrwx 3 root root 4096 Jan 3 19:59 app
drwxrwxrwx 3 root root 4096 Jan 3 19:59 lib
-rwxrwxrwx 1 root root 1429 Jan 3 19:59 main.css
-rwxrwxrwx 1 root root 4153 Jan 3 19:59 main.js
-rwxrwxrwx 1 root root 395 Jan 3 19:59 template.main.js
-rwxrwxrwx 1 root root 337 Jan 3 19:59 template.templates.js
drwxrwxrwx 3 root root 4096 Jan 3 19:59 highlight.js
-rwxrwxrwx 1 root root 17848 Jan 3 19:59 highlight.pack.js
drwxrwxrwx 2 root root 4096 Jan 3 19:59 styles
-rwxrwxrwx 1 root root 2552 Jan 3 19:59 default.css
-rwxrwxrwx 1 root root 1557 Jan 3 19:59 application-configuration.js
-rwxrwxrwx 1 root root 131 Jan 3 19:59 application-configuration.js.map
-rwxrwxrwx 1 root root 10296 Jan 3 19:59 autoupdate.js
-rwxrwxrwx 1 root root 4344 Jan 3 19:59 autoupdate.js.map
-rwxrwxrwx 1 root root 30962 Jan 3 19:59 check.js
-rwxrwxrwx 1 root root 13769 Jan 3 19:59 check.js.map
-rwxrwxrwx 1 root root 34115 Jan 3 19:59 deps.js
-rwxrwxrwx 1 root root 12796 Jan 3 19:59 deps.js.map
-rwxrwxrwx 1 root root 59298 Jan 3 19:59 domutils.js
-rwxrwxrwx 1 root root 25408 Jan 3 19:59 domutils.js.map
-rwxrwxrwx 1 root root 67567 Jan 3 19:59 ejson.js
-rwxrwxrwx 1 root root 21692 Jan 3 19:59 ejson.js.map
-rwxrwxrwx 1 root root 1562 Jan 3 19:59 follower-livedata.js
-rwxrwxrwx 1 root root 125 Jan 3 19:59 follower-livedata.js.map
-rwxrwxrwx 1 root root 48406 Jan 3 19:59 geojson-utils.js
-rwxrwxrwx 1 root root 15990 Jan 3 19:59 geojson-utils.js.map
-rwxrwxrwx 1 root root 493 Jan 3 19:59 global-imports.js
-rwxrwxrwx 1 root root 37547 Jan 3 19:59 handlebars.js
-rwxrwxrwx 1 root root 16703 Jan 3 19:59 handlebars.js.map
-rwxrwxrwx 1 root root 1202072 Jan 3 19:59 jquery.js
-rwxrwxrwx 1 root root 366987 Jan 3 19:59 jquery.js.map
-rwxrwxrwx 1 root root 58410 Jan 3 19:59 json.js
-rwxrwxrwx 1 root root 21539 Jan 3 19:59 json.js.map
-rwxrwxrwx 1 root root 560614 Jan 3 19:59 livedata.js
-rwxrwxrwx 1 root root 189125 Jan 3 19:59 livedata.js.map
-rwxrwxrwx 1 root root 62132 Jan 3 19:59 liverange.js
-rwxrwxrwx 1 root root 29655 Jan 3 19:59 liverange.js.map
-rwxrwxrwx 1 root root 27875 Jan 3 19:59 logging.js
-rwxrwxrwx 1 root root 10321 Jan 3 19:59 logging.js.map
-rwxrwxrwx 1 root root 102074 Jan 3 19:59 marked.js
-rwxrwxrwx 1 root root 33820 Jan 3 19:59 marked.js.map
-rwxrwxrwx 1 root root 82210 Jan 3 19:59 meteor.js
-rwxrwxrwx 1 root root 26826 Jan 3 19:59 meteor.js.map
-rwxrwxrwx 1 root root 323368 Jan 3 19:59 minimongo.js
-rwxrwxrwx 1 root root 121486 Jan 3 19:59 minimongo.js.map
-rwxrwxrwx 1 root root 102219 Jan 3 19:59 mongo-livedata.js
-rwxrwxrwx 1 root root 39683 Jan 3 19:59 mongo-livedata.js.map
-rwxrwxrwx 1 root root 20462 Jan 3 19:59 ordered-dict.js
-rwxrwxrwx 1 root root 7503 Jan 3 19:59 ordered-dict.js.map
-rwxrwxrwx 1 root root 53364 Jan 3 19:59 page-js-ie-support.js
-rwxrwxrwx 1 root root 13636 Jan 3 19:59 page-js-ie-support.js.map
-rwxrwxrwx 1 root root 2558 Jan 3 19:59 preserve-inputs.js
-rwxrwxrwx 1 root root 471 Jan 3 19:59 preserve-inputs.js.map
-rwxrwxrwx 1 root root 21800 Jan 3 19:59 random.js
-rwxrwxrwx 1 root root 8299 Jan 3 19:59 random.js.map
-rwxrwxrwx 1 root root 13878 Jan 3 19:59 reactive-dict.js
-rwxrwxrwx 1 root root 5176 Jan 3 19:59 reactive-dict.js.map
-rwxrwxrwx 1 root root 19595 Jan 3 19:59 reload.js
-rwxrwxrwx 1 root root 7551 Jan 3 19:59 reload.js.map
-rwxrwxrwx 1 root root 44685 Jan 3 19:59 router.js
-rwxrwxrwx 1 root root 13728 Jan 3 19:59 router.js.map
-rwxrwxrwx 1 root root 3314 Jan 3 19:59 session.js
-rwxrwxrwx 1 root root 661 Jan 3 19:59 session.js.map
-rwxrwxrwx 1 root root 204184 Jan 3 19:59 spark.js
-rwxrwxrwx 1 root root 83409 Jan 3 19:59 spark.js.map
-rwxrwxrwx 1 root root 1466 Jan 3 19:59 spiderable.js
-rwxrwxrwx 1 root root 114 Jan 3 19:59 spiderable.js.map
-rwxrwxrwx 1 root root 1457 Jan 3 19:59 standard-app-packages.js
-rwxrwxrwx 1 root root 124 Jan 3 19:59 standard-app-packages.js.map
-rwxrwxrwx 1 root root 1356 Jan 3 19:59 startup.js
-rwxrwxrwx 1 root root 108 Jan 3 19:59 startup.js.map
-rwxrwxrwx 1 root root 24071 Jan 3 19:59 templating.js
-rwxrwxrwx 1 root root 9422 Jan 3 19:59 templating.js.map
-rwxrwxrwx 1 root root 147815 Jan 3 19:59 underscore.js
-rwxrwxrwx 1 root root 54556 Jan 3 19:59 underscore.js.map
-rwxrwxrwx 1 root root 59722 Jan 3 19:59 universal-events.js
-rwxrwxrwx 1 root root 28310 Jan 3 19:59 universal-events.js.map
-rwxrwxrwx 1 root root 1355 Jan 3 19:59 webapp.js
-rwxrwxrwx 1 root root 107 Jan 3 19:59 webapp.js.map
-rwxrwxrwx 1 root root 6411 Jan 3 19:59 boot.js
-rwxrwxrwx 1 root root 32 Jan 3 19:59 config.json
lrwxrwxrwx 1 root root 47 Jan 3 19:59 node_modules -> /root/.meteor/tools/09b63f1ed5/lib/node_modules
drwxrwxrwx 6 root root 4096 Jan 3 19:59 npm
drwxrwxrwx 2 root root 4096 Jan 3 19:59 packages
-rwxrwxrwx 1 root root 2603 Jan 3 19:59 program.json
-rwxrwxrwx 1 root root 2716 Jan 3 19:59 start.sh
drwxrwxrwx 3 root root 4096 Jan 3 19:59 ctl-helper
drwxrwxrwx 3 root root 4096 Jan 3 19:59 livedata
drwxrwxrwx 3 root root 4096 Jan 3 19:59 logging
drwxrwxrwx 3 root root 4096 Jan 3 19:59 mongo-livedata
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 61 Jan 3 19:59 node_modules -> /root/.meteor/packages/ctl-helper/d6214568fb/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 59 Jan 3 19:59 node_modules -> /root/.meteor/packages/livedata/f69d9149dd/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 58 Jan 3 19:59 node_modules -> /root/.meteor/packages/logging/04f04cd832/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 65 Jan 3 19:59 node_modules -> /root/.meteor/packages/mongo-livedata/133ed3e7a3/npm/node_modules
-rwxrwxrwx 1 root root 14673 Jan 3 19:59 application-configuration.js
-rwxrwxrwx 1 root root 5102 Jan 3 19:59 application-configuration.js.map
-rwxrwxrwx 1 root root 29768 Jan 3 19:59 check.js
-rwxrwxrwx 1 root root 13747 Jan 3 19:59 check.js.map
-rwxrwxrwx 1 root root 21450 Jan 3 19:59 ctl-helper.js
-rwxrwxrwx 1 root root 8410 Jan 3 19:59 ctl-helper.js.map
-rwxrwxrwx 1 root root 14131 Jan 3 19:59 ctl.js
-rwxrwxrwx 1 root root 5110 Jan 3 19:59 ctl.js.map
-rwxrwxrwx 1 root root 32921 Jan 3 19:59 deps.js
-rwxrwxrwx 1 root root 12774 Jan 3 19:59 deps.js.map
-rwxrwxrwx 1 root root 66343 Jan 3 19:59 ejson.js
-rwxrwxrwx 1 root root 21669 Jan 3 19:59 ejson.js.map
-rwxrwxrwx 1 root root 26264 Jan 3 19:59 follower-livedata.js
-rwxrwxrwx 1 root root 9274 Jan 3 19:59 follower-livedata.js.map
-rwxrwxrwx 1 root root 47212 Jan 3 19:59 geojson-utils.js
-rwxrwxrwx 1 root root 15968 Jan 3 19:59 geojson-utils.js.map
-rwxrwxrwx 1 root root 159 Jan 3 19:59 json.js
-rwxrwxrwx 1 root root 83 Jan 3 19:59 json.js.map
-rwxrwxrwx 1 root root 486950 Jan 3 19:59 livedata.js
-rwxrwxrwx 1 root root 159409 Jan 3 19:59 livedata.js.map
-rwxrwxrwx 1 root root 26681 Jan 3 19:59 logging.js
-rwxrwxrwx 1 root root 10299 Jan 3 19:59 logging.js.map
-rwxrwxrwx 1 root root 117915 Jan 3 19:59 meteor.js
-rwxrwxrwx 1 root root 38384 Jan 3 19:59 meteor.js.map
-rwxrwxrwx 1 root root 345015 Jan 3 19:59 minimongo.js
-rwxrwxrwx 1 root root 129871 Jan 3 19:59 minimongo.js.map
-rwxrwxrwx 1 root root 366752 Jan 3 19:59 mongo-livedata.js
-rwxrwxrwx 1 root root 143322 Jan 3 19:59 mongo-livedata.js.map
-rwxrwxrwx 1 root root 19268 Jan 3 19:59 ordered-dict.js
-rwxrwxrwx 1 root root 7481 Jan 3 19:59 ordered-dict.js.map
-rwxrwxrwx 1 root root 20606 Jan 3 19:59 random.js
-rwxrwxrwx 1 root root 8277 Jan 3 19:59 random.js.map
-rwxrwxrwx 1 root root 146621 Jan 3 19:59 underscore.js
-rwxrwxrwx 1 root root 54534 Jan 3 19:59 underscore.js.map
drwxrwxrwx 3 root root 4096 Jan 3 19:59 app
-rwxrwxrwx 1 root root 6411 Jan 3 19:59 boot.js
-rwxrwxrwx 1 root root 70 Jan 3 19:59 config.json
lrwxrwxrwx 1 root root 47 Jan 3 19:59 node_modules -> /root/.meteor/tools/09b63f1ed5/lib/node_modules
drwxrwxrwx 8 root root 4096 Jan 3 19:59 npm
drwxrwxrwx 2 root root 4096 Jan 3 19:59 packages
-rwxrwxrwx 1 root root 4508 Jan 3 19:59 program.json
-rwxrwxrwx 1 root root 2716 Jan 3 19:59 start.sh
drwxrwxrwx 3 root root 4096 Jan 3 19:59 app
drwxrwxrwx 3 root root 4096 Jan 3 19:59 lib
-rwxrwxrwx 1 root root 4153 Jan 3 19:59 main.js
drwxrwxrwx 2 root root 4096 Jan 3 19:59 highlight.js
-rwxrwxrwx 1 root root 17848 Jan 3 19:59 highlight.pack.js
drwxrwxrwx 3 root root 4096 Jan 3 19:59 handlebars
drwxrwxrwx 3 root root 4096 Jan 3 19:59 livedata
drwxrwxrwx 3 root root 4096 Jan 3 19:59 logging
drwxrwxrwx 3 root root 4096 Jan 3 19:59 mongo-livedata
drwxrwxrwx 3 root root 4096 Jan 3 19:59 router
drwxrwxrwx 3 root root 4096 Jan 3 19:59 webapp
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 61 Jan 3 19:59 node_modules -> /root/.meteor/packages/handlebars/0a8b732b9d/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 59 Jan 3 19:59 node_modules -> /root/.meteor/packages/livedata/f69d9149dd/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 58 Jan 3 19:59 node_modules -> /root/.meteor/packages/logging/04f04cd832/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 65 Jan 3 19:59 node_modules -> /root/.meteor/packages/mongo-livedata/133ed3e7a3/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 51 Jan 3 19:59 node_modules -> /var/www/tk/packages/router/.build/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 57 Jan 3 19:59 node_modules -> /root/.meteor/packages/webapp/06c8311d2d/npm/node_modules
-rwxrwxrwx 1 root root 14673 Jan 3 19:59 application-configuration.js
-rwxrwxrwx 1 root root 5102 Jan 3 19:59 application-configuration.js.map
-rwxrwxrwx 1 root root 8244 Jan 3 19:59 autoupdate.js
-rwxrwxrwx 1 root root 4008 Jan 3 19:59 autoupdate.js.map
-rwxrwxrwx 1 root root 29768 Jan 3 19:59 check.js
-rwxrwxrwx 1 root root 13747 Jan 3 19:59 check.js.map
-rwxrwxrwx 1 root root 32921 Jan 3 19:59 deps.js
-rwxrwxrwx 1 root root 12774 Jan 3 19:59 deps.js.map
-rwxrwxrwx 1 root root 66343 Jan 3 19:59 ejson.js
-rwxrwxrwx 1 root root 21669 Jan 3 19:59 ejson.js.map
-rwxrwxrwx 1 root root 26264 Jan 3 19:59 follower-livedata.js
-rwxrwxrwx 1 root root 9274 Jan 3 19:59 follower-livedata.js.map
-rwxrwxrwx 1 root root 47212 Jan 3 19:59 geojson-utils.js
-rwxrwxrwx 1 root root 15968 Jan 3 19:59 geojson-utils.js.map
-rwxrwxrwx 1 root root 588 Jan 3 19:59 global-imports.js
-rwxrwxrwx 1 root root 16964 Jan 3 19:59 handlebars.js
-rwxrwxrwx 1 root root 8220 Jan 3 19:59 handlebars.js.map
-rwxrwxrwx 1 root root 161 Jan 3 19:59 jquery.js
-rwxrwxrwx 1 root root 85 Jan 3 19:59 jquery.js.map
-rwxrwxrwx 1 root root 159 Jan 3 19:59 json.js
-rwxrwxrwx 1 root root 83 Jan 3 19:59 json.js.map
-rwxrwxrwx 1 root root 486950 Jan 3 19:59 livedata.js
-rwxrwxrwx 1 root root 159409 Jan 3 19:59 livedata.js.map
-rwxrwxrwx 1 root root 26681 Jan 3 19:59 logging.js
-rwxrwxrwx 1 root root 10299 Jan 3 19:59 logging.js.map
-rwxrwxrwx 1 root root 99884 Jan 3 19:59 marked.js
-rwxrwxrwx 1 root root 33617 Jan 3 19:59 marked.js.map
-rwxrwxrwx 1 root root 117915 Jan 3 19:59 meteor.js
-rwxrwxrwx 1 root root 38384 Jan 3 19:59 meteor.js.map
-rwxrwxrwx 1 root root 345015 Jan 3 19:59 minimongo.js
-rwxrwxrwx 1 root root 129871 Jan 3 19:59 minimongo.js.map
-rwxrwxrwx 1 root root 366752 Jan 3 19:59 mongo-livedata.js
-rwxrwxrwx 1 root root 143322 Jan 3 19:59 mongo-livedata.js.map
-rwxrwxrwx 1 root root 19268 Jan 3 19:59 ordered-dict.js
-rwxrwxrwx 1 root root 7481 Jan 3 19:59 ordered-dict.js.map
-rwxrwxrwx 1 root root 203 Jan 3 19:59 preserve-inputs.js
-rwxrwxrwx 1 root root 95 Jan 3 19:59 preserve-inputs.js.map
-rwxrwxrwx 1 root root 20606 Jan 3 19:59 random.js
-rwxrwxrwx 1 root root 8277 Jan 3 19:59 random.js.map
-rwxrwxrwx 1 root root 161 Jan 3 19:59 reload.js
-rwxrwxrwx 1 root root 85 Jan 3 19:59 reload.js.map
-rwxrwxrwx 1 root root 15797 Jan 3 19:59 routepolicy.js
-rwxrwxrwx 1 root root 5460 Jan 3 19:59 routepolicy.js.map
-rwxrwxrwx 1 root root 35844 Jan 3 19:59 router.js
-rwxrwxrwx 1 root root 10422 Jan 3 19:59 router.js.map
-rwxrwxrwx 1 root root 162 Jan 3 19:59 session.js
-rwxrwxrwx 1 root root 86 Jan 3 19:59 session.js.map
-rwxrwxrwx 1 root root 160 Jan 3 19:59 spark.js
-rwxrwxrwx 1 root root 84 Jan 3 19:59 spark.js.map
-rwxrwxrwx 1 root root 13828 Jan 3 19:59 spiderable.js
-rwxrwxrwx 1 root root 5456 Jan 3 19:59 spiderable.js.map
-rwxrwxrwx 1 root root 227 Jan 3 19:59 standard-app-packages.js
-rwxrwxrwx 1 root root 101 Jan 3 19:59 standard-app-packages.js.map
-rwxrwxrwx 1 root root 165 Jan 3 19:59 templating.js
-rwxrwxrwx 1 root root 89 Jan 3 19:59 templating.js.map
-rwxrwxrwx 1 root root 146621 Jan 3 19:59 underscore.js
-rwxrwxrwx 1 root root 54534 Jan 3 19:59 underscore.js.map
-rwxrwxrwx 1 root root 83198 Jan 3 19:59 webapp.js
-rwxrwxrwx 1 root root 30430 Jan 3 19:59 webapp.js.map
-rwxrwxrwx 1 root root 16777216 Jan 3 19:59 local.0
-rwxrwxrwx 1 root root 33554432 Dec 29 12:36 local.1
-rwxrwxrwx 1 root root 16777216 Jan 3 19:59 local.ns
-rwxrwxrwx 1 root root 4 Dec 29 12:36 METEOR-PORT
-rwxrwxrwx 1 root root 0 Jan 3 21:05 mongod.lock
And here as root:
drwxrwxrwx 4 root root 4096 Jan 3 19:59 local
-rwxrwxrwx 1 root root 220 Jan 3 11:51 packages
-rwxrwxrwx 1 root root 8 Dec 29 12:35 release
drwxrwxrwx 4 root root 4096 Jan 3 19:59 build
drwxrwxrwx 2 vagrant root 4096 Dec 29 12:39 db
-rwxrwxrwx 1 root root 151 Jan 3 19:59 main.js
drwxrwxrwx 5 root root 4096 Jan 3 19:59 programs
-rwxrwxrwx 1 root root 650 Jan 3 19:59 README
drwxrwxrwx 2 root root 4096 Jan 3 19:59 server
-rwxrwxrwx 1 root root 459 Jan 3 19:59 star.json
drwxrwxrwx 4 root root 4096 Jan 3 19:59 client
drwxrwxrwx 4 root root 4096 Jan 3 19:59 ctl
drwxrwxrwx 5 root root 4096 Jan 3 19:59 server
drwxrwxrwx 3 root root 4096 Jan 3 19:59 app
-rwxrwxrwx 1 root root 5836 Jan 3 19:59 app.html
drwxrwxrwx 2 root root 4096 Jan 3 19:59 packages
-rwxrwxrwx 1 root root 16184 Jan 3 19:59 program.json
drwxrwxrwx 3 root root 4096 Jan 3 19:59 app
drwxrwxrwx 3 root root 4096 Jan 3 19:59 lib
-rwxrwxrwx 1 root root 1429 Jan 3 19:59 main.css
-rwxrwxrwx 1 root root 4153 Jan 3 19:59 main.js
-rwxrwxrwx 1 root root 395 Jan 3 19:59 template.main.js
-rwxrwxrwx 1 root root 337 Jan 3 19:59 template.templates.js
drwxrwxrwx 3 root root 4096 Jan 3 19:59 highlight.js
-rwxrwxrwx 1 root root 17848 Jan 3 19:59 highlight.pack.js
drwxrwxrwx 2 root root 4096 Jan 3 19:59 styles
-rwxrwxrwx 1 root root 2552 Jan 3 19:59 default.css
-rwxrwxrwx 1 root root 1557 Jan 3 19:59 application-configuration.js
-rwxrwxrwx 1 root root 131 Jan 3 19:59 application-configuration.js.map
-rwxrwxrwx 1 root root 10296 Jan 3 19:59 autoupdate.js
-rwxrwxrwx 1 root root 4344 Jan 3 19:59 autoupdate.js.map
-rwxrwxrwx 1 root root 30962 Jan 3 19:59 check.js
-rwxrwxrwx 1 root root 13769 Jan 3 19:59 check.js.map
-rwxrwxrwx 1 root root 34115 Jan 3 19:59 deps.js
-rwxrwxrwx 1 root root 12796 Jan 3 19:59 deps.js.map
-rwxrwxrwx 1 root root 59298 Jan 3 19:59 domutils.js
-rwxrwxrwx 1 root root 25408 Jan 3 19:59 domutils.js.map
-rwxrwxrwx 1 root root 67567 Jan 3 19:59 ejson.js
-rwxrwxrwx 1 root root 21692 Jan 3 19:59 ejson.js.map
-rwxrwxrwx 1 root root 1562 Jan 3 19:59 follower-livedata.js
-rwxrwxrwx 1 root root 125 Jan 3 19:59 follower-livedata.js.map
-rwxrwxrwx 1 root root 48406 Jan 3 19:59 geojson-utils.js
-rwxrwxrwx 1 root root 15990 Jan 3 19:59 geojson-utils.js.map
-rwxrwxrwx 1 root root 493 Jan 3 19:59 global-imports.js
-rwxrwxrwx 1 root root 37547 Jan 3 19:59 handlebars.js
-rwxrwxrwx 1 root root 16703 Jan 3 19:59 handlebars.js.map
-rwxrwxrwx 1 root root 1202072 Jan 3 19:59 jquery.js
-rwxrwxrwx 1 root root 366987 Jan 3 19:59 jquery.js.map
-rwxrwxrwx 1 root root 58410 Jan 3 19:59 json.js
-rwxrwxrwx 1 root root 21539 Jan 3 19:59 json.js.map
-rwxrwxrwx 1 root root 560614 Jan 3 19:59 livedata.js
-rwxrwxrwx 1 root root 189125 Jan 3 19:59 livedata.js.map
-rwxrwxrwx 1 root root 62132 Jan 3 19:59 liverange.js
-rwxrwxrwx 1 root root 29655 Jan 3 19:59 liverange.js.map
-rwxrwxrwx 1 root root 27875 Jan 3 19:59 logging.js
-rwxrwxrwx 1 root root 10321 Jan 3 19:59 logging.js.map
-rwxrwxrwx 1 root root 102074 Jan 3 19:59 marked.js
-rwxrwxrwx 1 root root 33820 Jan 3 19:59 marked.js.map
-rwxrwxrwx 1 root root 82210 Jan 3 19:59 meteor.js
-rwxrwxrwx 1 root root 26826 Jan 3 19:59 meteor.js.map
-rwxrwxrwx 1 root root 323368 Jan 3 19:59 minimongo.js
-rwxrwxrwx 1 root root 121486 Jan 3 19:59 minimongo.js.map
-rwxrwxrwx 1 root root 102219 Jan 3 19:59 mongo-livedata.js
-rwxrwxrwx 1 root root 39683 Jan 3 19:59 mongo-livedata.js.map
-rwxrwxrwx 1 root root 20462 Jan 3 19:59 ordered-dict.js
-rwxrwxrwx 1 root root 7503 Jan 3 19:59 ordered-dict.js.map
-rwxrwxrwx 1 root root 53364 Jan 3 19:59 page-js-ie-support.js
-rwxrwxrwx 1 root root 13636 Jan 3 19:59 page-js-ie-support.js.map
-rwxrwxrwx 1 root root 2558 Jan 3 19:59 preserve-inputs.js
-rwxrwxrwx 1 root root 471 Jan 3 19:59 preserve-inputs.js.map
-rwxrwxrwx 1 root root 21800 Jan 3 19:59 random.js
-rwxrwxrwx 1 root root 8299 Jan 3 19:59 random.js.map
-rwxrwxrwx 1 root root 13878 Jan 3 19:59 reactive-dict.js
-rwxrwxrwx 1 root root 5176 Jan 3 19:59 reactive-dict.js.map
-rwxrwxrwx 1 root root 19595 Jan 3 19:59 reload.js
-rwxrwxrwx 1 root root 7551 Jan 3 19:59 reload.js.map
-rwxrwxrwx 1 root root 44685 Jan 3 19:59 router.js
-rwxrwxrwx 1 root root 13728 Jan 3 19:59 router.js.map
-rwxrwxrwx 1 root root 3314 Jan 3 19:59 session.js
-rwxrwxrwx 1 root root 661 Jan 3 19:59 session.js.map
-rwxrwxrwx 1 root root 204184 Jan 3 19:59 spark.js
-rwxrwxrwx 1 root root 83409 Jan 3 19:59 spark.js.map
-rwxrwxrwx 1 root root 1466 Jan 3 19:59 spiderable.js
-rwxrwxrwx 1 root root 114 Jan 3 19:59 spiderable.js.map
-rwxrwxrwx 1 root root 1457 Jan 3 19:59 standard-app-packages.js
-rwxrwxrwx 1 root root 124 Jan 3 19:59 standard-app-packages.js.map
-rwxrwxrwx 1 root root 1356 Jan 3 19:59 startup.js
-rwxrwxrwx 1 root root 108 Jan 3 19:59 startup.js.map
-rwxrwxrwx 1 root root 24071 Jan 3 19:59 templating.js
-rwxrwxrwx 1 root root 9422 Jan 3 19:59 templating.js.map
-rwxrwxrwx 1 root root 147815 Jan 3 19:59 underscore.js
-rwxrwxrwx 1 root root 54556 Jan 3 19:59 underscore.js.map
-rwxrwxrwx 1 root root 59722 Jan 3 19:59 universal-events.js
-rwxrwxrwx 1 root root 28310 Jan 3 19:59 universal-events.js.map
-rwxrwxrwx 1 root root 1355 Jan 3 19:59 webapp.js
-rwxrwxrwx 1 root root 107 Jan 3 19:59 webapp.js.map
-rwxrwxrwx 1 root root 6411 Jan 3 19:59 boot.js
-rwxrwxrwx 1 root root 32 Jan 3 19:59 config.json
lrwxrwxrwx 1 root root 47 Jan 3 19:59 node_modules -> /root/.meteor/tools/09b63f1ed5/lib/node_modules
drwxrwxrwx 6 root root 4096 Jan 3 19:59 npm
drwxrwxrwx 2 root root 4096 Jan 3 19:59 packages
-rwxrwxrwx 1 root root 2603 Jan 3 19:59 program.json
-rwxrwxrwx 1 root root 2716 Jan 3 19:59 start.sh
drwxrwxrwx 3 root root 4096 Jan 3 19:59 ctl-helper
drwxrwxrwx 3 root root 4096 Jan 3 19:59 livedata
drwxrwxrwx 3 root root 4096 Jan 3 19:59 logging
drwxrwxrwx 3 root root 4096 Jan 3 19:59 mongo-livedata
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 61 Jan 3 19:59 node_modules -> /root/.meteor/packages/ctl-helper/d6214568fb/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 59 Jan 3 19:59 node_modules -> /root/.meteor/packages/livedata/f69d9149dd/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 58 Jan 3 19:59 node_modules -> /root/.meteor/packages/logging/04f04cd832/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 65 Jan 3 19:59 node_modules -> /root/.meteor/packages/mongo-livedata/133ed3e7a3/npm/node_modules
-rwxrwxrwx 1 root root 14673 Jan 3 19:59 application-configuration.js
-rwxrwxrwx 1 root root 5102 Jan 3 19:59 application-configuration.js.map
-rwxrwxrwx 1 root root 29768 Jan 3 19:59 check.js
-rwxrwxrwx 1 root root 13747 Jan 3 19:59 check.js.map
-rwxrwxrwx 1 root root 21450 Jan 3 19:59 ctl-helper.js
-rwxrwxrwx 1 root root 8410 Jan 3 19:59 ctl-helper.js.map
-rwxrwxrwx 1 root root 14131 Jan 3 19:59 ctl.js
-rwxrwxrwx 1 root root 5110 Jan 3 19:59 ctl.js.map
-rwxrwxrwx 1 root root 32921 Jan 3 19:59 deps.js
-rwxrwxrwx 1 root root 12774 Jan 3 19:59 deps.js.map
-rwxrwxrwx 1 root root 66343 Jan 3 19:59 ejson.js
-rwxrwxrwx 1 root root 21669 Jan 3 19:59 ejson.js.map
-rwxrwxrwx 1 root root 26264 Jan 3 19:59 follower-livedata.js
-rwxrwxrwx 1 root root 9274 Jan 3 19:59 follower-livedata.js.map
-rwxrwxrwx 1 root root 47212 Jan 3 19:59 geojson-utils.js
-rwxrwxrwx 1 root root 15968 Jan 3 19:59 geojson-utils.js.map
-rwxrwxrwx 1 root root 159 Jan 3 19:59 json.js
-rwxrwxrwx 1 root root 83 Jan 3 19:59 json.js.map
-rwxrwxrwx 1 root root 486950 Jan 3 19:59 livedata.js
-rwxrwxrwx 1 root root 159409 Jan 3 19:59 livedata.js.map
-rwxrwxrwx 1 root root 26681 Jan 3 19:59 logging.js
-rwxrwxrwx 1 root root 10299 Jan 3 19:59 logging.js.map
-rwxrwxrwx 1 root root 117915 Jan 3 19:59 meteor.js
-rwxrwxrwx 1 root root 38384 Jan 3 19:59 meteor.js.map
-rwxrwxrwx 1 root root 345015 Jan 3 19:59 minimongo.js
-rwxrwxrwx 1 root root 129871 Jan 3 19:59 minimongo.js.map
-rwxrwxrwx 1 root root 366752 Jan 3 19:59 mongo-livedata.js
-rwxrwxrwx 1 root root 143322 Jan 3 19:59 mongo-livedata.js.map
-rwxrwxrwx 1 root root 19268 Jan 3 19:59 ordered-dict.js
-rwxrwxrwx 1 root root 7481 Jan 3 19:59 ordered-dict.js.map
-rwxrwxrwx 1 root root 20606 Jan 3 19:59 random.js
-rwxrwxrwx 1 root root 8277 Jan 3 19:59 random.js.map
-rwxrwxrwx 1 root root 146621 Jan 3 19:59 underscore.js
-rwxrwxrwx 1 root root 54534 Jan 3 19:59 underscore.js.map
drwxrwxrwx 3 root root 4096 Jan 3 19:59 app
-rwxrwxrwx 1 root root 6411 Jan 3 19:59 boot.js
-rwxrwxrwx 1 root root 70 Jan 3 19:59 config.json
lrwxrwxrwx 1 root root 47 Jan 3 19:59 node_modules -> /root/.meteor/tools/09b63f1ed5/lib/node_modules
drwxrwxrwx 8 root root 4096 Jan 3 19:59 npm
drwxrwxrwx 2 root root 4096 Jan 3 19:59 packages
-rwxrwxrwx 1 root root 4508 Jan 3 19:59 program.json
-rwxrwxrwx 1 root root 2716 Jan 3 19:59 start.sh
drwxrwxrwx 3 root root 4096 Jan 3 19:59 app
drwxrwxrwx 3 root root 4096 Jan 3 19:59 lib
-rwxrwxrwx 1 root root 4153 Jan 3 19:59 main.js
drwxrwxrwx 2 root root 4096 Jan 3 19:59 highlight.js
-rwxrwxrwx 1 root root 17848 Jan 3 19:59 highlight.pack.js
drwxrwxrwx 3 root root 4096 Jan 3 19:59 handlebars
drwxrwxrwx 3 root root 4096 Jan 3 19:59 livedata
drwxrwxrwx 3 root root 4096 Jan 3 19:59 logging
drwxrwxrwx 3 root root 4096 Jan 3 19:59 mongo-livedata
drwxrwxrwx 3 root root 4096 Jan 3 19:59 router
drwxrwxrwx 3 root root 4096 Jan 3 19:59 webapp
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 61 Jan 3 19:59 node_modules -> /root/.meteor/packages/handlebars/0a8b732b9d/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 59 Jan 3 19:59 node_modules -> /root/.meteor/packages/livedata/f69d9149dd/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 58 Jan 3 19:59 node_modules -> /root/.meteor/packages/logging/04f04cd832/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 65 Jan 3 19:59 node_modules -> /root/.meteor/packages/mongo-livedata/133ed3e7a3/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 51 Jan 3 19:59 node_modules -> /var/www/tk/packages/router/.build/npm/node_modules
drwxrwxrwx 2 root root 4096 Jan 3 19:59 main
lrwxrwxrwx 1 root root 57 Jan 3 19:59 node_modules ->
--- cut off because of limits ---
MongoDb won't run in the Vagrant shared directory: https://gist.github.com/gabrielhpugliese/5855677
If you using Windows for your dev work, Meteor now has a Windows installer:
http://win.meteor.com/
Mongo was killed without cleaning itself up. Try removing .meteor/local/db/mongod.lock. If that fails do an meteor reset.
There are files owned by root that shouldn't be. Run the following to set the ownership back to the current user (who I am assuming to be the one who is meant to run mrt):
sudo chown -R `whoami`:`groups | cut -d ' ' -f 1` *
This is a list of steps to reinstall meteor and meteorite
Uninstall meteor
sudo rm /usr/local/bin/meteor
rm -rf ~/.meteor
Uninstall meteorite
sudo mrt uninstall
sudo mrt uninstall --system
sudo chown -R `whoami` ~/.npm
The last command is to make sure that ~/.npm permissions are correct.
Install meteor
curl https://install.meteor.com | sh
Install meteorite
sudo -H npm install -g meteorite
I had the same problem.
First I changed permissions sudo chown -Rv <user> .meteor and then meteor reset.
In my case it works, when running the meteor application as root-user.
su root
meteor
I was using meteor with docker and created meteor app in a mounted directory which was not under home directory.
Resolved itself, when i created the app in a directory under home directory.
I use vagrant as development environment. When building application under /vagrant, this error always happens. When I switch to /home/vagrant, then this error is solved.
I think this is caused by permission, but since /vagrant is also mapped by vagrant account, so there is no difference.
I still didn't figure out why.