Getting a strange error on my Crouton chroot on my Chromebook after apt-get install smlnj and attempting to call sml from the terminal, an error that I haven't been able to find anywhere else:
$ sml
/usr/lib/smlnj/bin/sml: Error -- unable to map 1179648 bytes, errno = 1
/usr/lib/smlnj/bin/sml: Fatal error -- unable to allocate memory object for BIBOP
Any guidance?
Edit: This issue (bug #120) was fixed in SML/NJ version 110.77 (release notes) by enabling MAP_ANONYMOUS, which was previously unsupported in Linux. Installing the latest version of SMLNJ would be preferable to the solution below, since it doesn't require weakening the security of the system. If you do continue via modifying the permissions of /dev, it's advisable to remove exec permission after each session.
This problem is primarily reproducible in a Chromium OS environment running ChrUbuntu or Crouton, but may happen to other users in other environments who have a similar problem.
Running strace on sml gives this (attempted) operation before the error output:
open("/dev/zero", O_RDONLY) = 4
mmap2(NULL, 1245184, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 4, 0) = -1 EPERM (Operation not permitted)
According to the mmap(2) documentation, EPERM indicates that the system is attempting to allocate memory with execute permission in a directory that is marked noexec.
Indeed, mount gives:
...
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=960456k,nr_inodes=240114,mode=755)
...
The solution is thus to remount /dev with exec permission:
$ sudo mount -o remount,exec /dev
$ sml
Standard ML of New Jersey v110.75 [built: Thu May 9 05:41:01 2013]
-
Related
I cannot opam init:
$ opam init --verbose
[NOTE] Will configure from built-in defaults.
Checking for available remotes: rsync and local, git, mercurial.
- you won't be able to use darcs repositories unless you install the darcs command on your system.
<><> Fetching repository information ><><><><><><><><><><><><><><><><><><><><><>
[ERROR] Could not update repository "default": OpamDownload.Download_fail(_, "Curl failed: \"/usr/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2
--user-agent opam/2.0.7 -L -o /tmp/opam-1697-6d07ae/index.tar.gz.part https://opam.ocaml.org/index.tar.gz\" exited with code 28")
[ERROR] Initial download of repository failed
However, I've manually downloaded index.tar.gz. How to manually specify index.tar.gz to opam init?
System info:
$ uname -a
CYGWIN_NT-10.0-19043 xxx 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin
P.S. I'm trying to build one project using OCaml, but it turned out that it is very tricky: either OCaml complains about compatibility (is not a compiled interface for this version of OCaml followed by It seems to be for an older version of OCaml; does it mean that OCaml is not backward compatible?), either opam init fails, either <whatever>.
Your error message indicates that you either have network problems or very poor connection. Also, you opam version is very old, so it might not handle bad networks very well, I would suggest your installing a newer version of opam (at least 2.1.x), or, if it is possible, switching to docker or a virtual machine.
Answering your original question: I don't think there is a way (at least officially supported to specify your own downloaded index). Also, if you have trouble with downloading the index it most likely means that you will have more trouble in the future with your network when opam will start downloading actual packages.
To start Code and Compile C++, must install a compiler. For my case, it is MSYS2 through which MinGW is available. According to the installation guild mentioned on the website, I installed the software without any errors. Now I was supposed to update the package database and base packages by entering pacman -Sys but it has shown an error
error: failed to synchronize all databases (unable to lock database)
After searching online for a solution I found that deleting/removing the db.lck will work, for that, I used this command rm /var/lib/pacman/db.lck
but it showed another error. Right now there is no solution to this on the internet.
I've also pasted the terminal output of MSYS2 MSYS for refernce.
$ pacman -Sys
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
VIRAT#DESKTOP-97BS0AB MSYS ~
$ rm /var/lib/pacman/db.lck
rm: cannot remove '/var/lib/pacman/db.lck': No such file or directory
VIRAT#DESKTOP-97BS0AB MSYS ~
$ pacman -S --needed base-devel mingw-w64-x86_64-toolchain
error: failed to init transaction (unable to lock database)
error: could not lock database: Permission denied
VIRAT#DESKTOP-97BS0AB MSYS ~
$ pacman -Su
error: failed to init transaction (unable to lock database)
error: could not lock database: Permission denied
VIRAT#DESKTOP-97BS0AB MSYS ~
$
As I found there 2 solutions for this error. Try both :
Solution : 1
C:\Users\your_account_name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2 64bit
Run "MSYS2 MSYS" as administrator
Run the command : pacman -Syu
Solution - 2 :
C:\msys64\var\lib\pacman ( Go to the downloaded folder)
Delete the "db.lck" file
RESOURCES :
For solution 1 : Mr. Padro's (https://stackoverflow.com/users/18910613/pedro) solution helped me.
For solution 2
https://www.reddit.com/r/archlinux/comments/nvrny2/pacman_error_failed_to_synchronize_all_databases/
Try to run MSYS app under administrator privilege... worked for me
I'm using freeBSD on VirtualBox on Windows10.
I want to mount on Windows. (HOST:Windows GUEST:freeBSD)
I run mount command but got an error below.
mount -t vboxvfs -w mp /mnt/vbox
mount: mp: Operation not supported by device
How can I solve this error?
What I did:
I install virtualbox-ose-additions-nox11-5.2.34 and virtualbox-ose-kmod-5.2.34,
then append vboxguest_enable="YES" and vboxservice_enable="YES" to my /etc/rc.config.
mp is normal empty folder on C:
I also install Guest Additions following Virtualbox's dialog.
this error caused by typo.
wrong : vboxfs
correct: vboxvfs
(I write correct command in this Question but I enter wrong command to my machine.)
I'm trying to update debian 9 and virtualbox can't be upgrated...
I'm getting the error:
vboxdrv.sh: failed: Cannot unload module vboxdrv.
Does anybody has any idea ?
$ apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
virtualbox-5.1
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/66.9 MB of archives.
After this operation, 6,144 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 261193 files and directories currently installed.)
Preparing to unpack .../virtualbox-5.1_5.1.36-122089~Debian~stretch_amd64.deb ...
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
dpkg: error processing archive /var/cache/apt/archives/virtualbox-5.1_5.1.36-122089~Debian~stretch_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
A copy of VirtualBox is currently running. Please close it and try again.
Please note that it can take up to ten seconds for VirtualBox to finish running.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
vboxdrv.sh: failed: Cannot unload module vboxdrv.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
Errors were encountered while processing:
/var/cache/apt/archives/virtualbox-5.1_5.1.36-122089~Debian~stretch_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Seen in the error messages you posted:
A copy of VirtualBox is currently running. Please close it and try again.
Please note that it can take up to ten seconds for VirtualBox to finish running.
Did you try that ?
I installed ColdFusion 9.0.0 today and I'm trying to upgrade to 9.0.1.
Linux 64bit environment.
I don't have root access.
/tmp doesn't seem to have enough room to install 9.0.1
I found the following errors in /opt/coldfusion9/Adobe_ColdFusion_9.0.1_InstallLog.log
Install File: /tmp/515453.tmp/cf-multi-startup
Status: ERROR
Additional Notes: ERROR - ZeroGlq: No space left on device
Install File: /tmp/515453.tmp/cf-init.sh
Status: ERROR
Additional Notes: ERROR - ZeroGlq: No space left on device
I tried -D IATEMPDIR=/opt/temp, but installer says it's trying to use /home/coldfusion due to lack of space in /tmp. It tries to use /tmp anyway.
Any ideas?
Here's my final script that worked. I had to fill /tmp and /home to 100% to get a decent error response out of the bin file. I'm sure my Linux admins were very pleased.
cd /opt/coldfusion9/bin
IATEMPDIR=/home/coldfusion
export IATEMPDIR
LAX_DEBUG=1
export LAX_DEBUG
./ColdFusion_update_901_WWEJ_linux64.bin