I am recieving an error when installing my tgz npm file that there is no more space in the device and its the same across projects.
I tried multiple packages, and expected it to install like it had been and when performing an ls command I only see the tgz file.
Related
This question has been asked here and (erroneously) closed as a duplicate with a link to an old CMAKE question. Probably the closing person did not read the question properly. This has nothing to do with plain CMake configuration, unless you want to configure the CMake use in snapcraft source code.
Error when building flutter app for Linux snap package using snapcraft
The fact is that running snapcraft fails. Running it with --debug gives you a root console of the snapcraft / multipass filesystem, whoami says root, but you only see the snap things around (for instance, not your home). Anyways, the error says
CMake Error: The current CMakeCache.txt directory /root/parts/xxxxx/build/build/linux/release/CMakeCache.txt is different than the directory
/home/zolal/flutterapps/xxxxx/build/linux/release where CMakeCache.txt was created. This may result in binaries being created in the wrong
place. If you are not sure, reedit the CMakeCache.txt
(naturally, you cannot reedit the CMAKECache.txt, because this is created by snapcraft)
It seems that the cmake build starts outside of the snapcraft / multipass VM, and than moves to the multipass VM resulting in CMake error. Because the original question was asked a while ago, obviously this still does not work. Did anyone solve this problem alredy?
Update, purged multipass and tried with lxd:
snapcraft --use-lxd
Launching a container.
Waiting for container to be ready
Waiting for network to be ready...
snap "snapd" has no updates available
The flutter plugin is currently in beta, its API may break. Use at your own risk.
snapd is not logged in, snap install commands will use sudo
snap "core18" has no updates available
Skipping pull flutter-extension (already ran)
Skipping pull geraspine-outcome-pc (already ran)
Skipping pull gnome-3-28-extension (already ran)
Skipping build flutter-extension (already ran)
Building geraspine-outcome-pc
flutter pub get
Woah! You appear to be trying to run flutter as root.
We strongly recommend running the flutter tool without superuser privileges.
/
📎
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
Failed to run 'flutter pub get' for 'geraspine-outcome-pc': Exited with code 1.
Verify that the part is using the correct parameters and try again.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
Naturally, the pubspec.yaml is there, but the files are obviously not transferred to the VM.
The solution is to execute following command inside your flutter project root folder (where the build, lib, snap, etc. folders are contained):
snapcraft clean <project-name>
This deletes the build cache inside "/root/parts/>project-name>" folder.
Should that not be enough, you can clean the whole snapcraft parts folder with
snapcraft clean
but this includes all dependencies. This means that all dependencies must be downloaded again the next time you compile your project.
Then delete the whole folder of your_part_name under parts folder
This doesn't work because the "parts" folder is inside "/root" dir and we cannot access or delete the stuff inside manually.
But it would be nice if we can change the parts folder e.g. into our /home dir. But I haven't found any possibilities yet !
If you got any error when building this, just run snapcraft build --debug
Then delete the whole folder of your_part_name under parts folder
Delete build directory and build again.
src github-issue
For me it was important to delete the build directory in my local directory also:
rm -rf build && snapcraft clean <project> && snapcraft
I'm fairly new to Linux and am running CentOS 7. I can do the basics of navigating, creating dirctories, permissions, unzip applications and make SL to the apps but I have no idea what to do with an "rpm" file.
The system that I am trying to install MongoDB 4.2.x on does not have an outside connection. I have the individual rpm files for MongoDB but not the tgz which some article I read said I should use.
There is no way for me to get the tgz over to the machine unless I wait several days.
With only the .rpm files, how do I install MongoDB?
[https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/][1]
The instructions in the above link say to create the .repo file but that makes a reference to the external URL which the system does not have access to.
[mongodb-org-4.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/x86_64/
*
Again, with only the .rpm files, how do I install MongoDB?
*
You do need some kind of access to the outside world; you need to get the rpm files on your machine...
you can just manually download the rpm files you need from https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.2/x86_64/RPMS/, copy them to your machine, and then run
yum install /path/to/downloaded/mongodb*rpm
I just installed the LTS version of the .NET Core SDK (1.0.0-preview2-003156). I created a new project by using
dotnet new
However, this fails because
Failed to create prime the NuGet cache. restore failed with 1.
I followed the directions in this post to clear my local package cache and I am left with this package:
System.Security.Cryptography.Algorithms
The 4.2.0\ref sub-directory gives me this error when I try to open it:
The file or directory is corrupted and unreadable.
How do I go about clearing this package out or at least getting to the point where the package restore will work again?
I ended up having to run chkdsk against my machine. Because the package directory was on my C:\ drive, I had to reboot for it to run the disk repair. After the chkdsk completed, I was able to delete the package.
I have a relatively big project that has many dependencies, and I would like to distribute this project around, but installing these dependencies where a bit of a pain, and takes a very long time (pip install takes quite some time). So I was wondering if it was possible to migrate a whole virtualenv to another machine and have it running.
I tried copying the whole virtualenv, but whenever I try running something, this virtualenv still uses the path of my old machine. For instance when I run
source activate
pserve development.ini
I get
bash: ../bin/pserve: /home/sshum/backend/bin/python: bad interpreter: No such file or directory
This is my old directory. So is there a way to have virtualenv reconfigure this path with a new path?
I tried sed -i 's/sshum/dev1/g' * in the bin directory and it solved that issue. However, I'm getting a different issue now, my guess is that this sed changed something.
I've confirmed that I have libssl-dev installed but when I run python I get:
E: Unable to locate package libssl.so.1.0.0
E: Couldn't find any package by regex 'libssl.so.1.0.0'
But when I run aptitude search libssl and I see:
i A libssl-dev - SSL development libraries, header files and documentation
I also tried virtualenv --relocatable backend but no go.
Export virtualenvironment
from within the virtual environment:
pip freeze > requirements.txt
as example, here is for myproject virtual environment:
once in the new machine & environment, copy the requirements.txt into the new project folder in the new machine and run the terminal command:
sudo pip install -r requirements.txt
then you should have all the packages previously available in the old virtual environment.
When you create a new virtualenv it is configured for the computer it is running on. I even think that it is configured for that specific directory it is created in. So I think you should always create a fresh virtualenv when you move you code. What might work is copying the lib/Pythonx.x/site-packages in your virtualenv directory, but I don't think that is a particularly good solution.
What may be a better solution is using the pip download cache. This will at least speed up the download part of pip install. Have a look at this thread: How do I install from a local cache with pip?
The clean way seems to be with virtualenv --relocatable.
Alternatively, you can do it manually by editing the VIRTUAL_ENV path in bin/activate to reflect the changes. If you choose to do so, you must also edit the first line (#) of bin/pserve which indicates the interpreter path.
I'd like to install a PHP extension on a bluehost shared site; specifically the MongoDB driver. Since pecl is unable to write to the primary server directory that has all the installed extensions, I'd like to install the mongo.so file to a directory I specify under my home. The closest article I found on the web was:
http://www.site5.com/blog/programming/php/how-to-setup-your-own-php-pear-environment/20090624/
However, after following the steps when I use the "pecl install mongo" command, it still keeps trying to install to bluehost's central directory on the server.
According to my web host's technical support team, utilising the pecl installer attempts to install the extension server-wide rather than under your account only. My web host doesn't allow server-wide installations in their shared environment for security reasons and because they want to keep their fleet universally the same across the board. I suspect your host is the same.
However, they did suggest I download, configure and install the pecl package (pecl_http) in my account only (rather than server-wide) via the following manual process:
$ cd ~/
$ wget http://pecl.php.net/get/pecl_http
$ tar -zxvf pecl_http.tar.gz
$ cd pecl_http
$ phpize
$ ./configure --prefix=~/bin
$ make
$ make test
$ make install
A successful install will have created extname.so and put it into the
PHP extensions directory. You'll need to edit php.ini (in my case,
this was a copy of the standard php.ini file that I placed in the same
folder as the script using the extension) and add an
extension=extname.so line (in my case, extension=http.so) before you can use the extension.
http://www.php.net/manual/en/install.pecl.phpize.php
Note that the tilde character (~) in the above code refers to the home directory of the current user (e.g. /home/username on my host's server).
Issues you may run into
When using the tar command, a "cannot open: not a directory" error
appeared as pecl_http had been downloaded without a file extension.
This was easily corrected:
mv pecl_http pecl_http.tar.gz
When using the make install command, a "cp: cannot create regular
file...: Permission denied" errror appeared. I resolved this issue
by changing the ext_dir for pecl...
pecl config-set ext_dir /home/username/bin/extensions
...and re-running make install. I also had to copy the http.so extension to /home/username/bin/extensions and then reference that location in my php.ini file:
extension_dir = "/home/username/bin/extensions"
this sounds like you don't have root access to your server. if your need to compile anything you must be have root access permission to server, or maybe you must be one of the sudoers.